From 55393337efbf7be6a13b7233c280cd063e5c0c1e Mon Sep 17 00:00:00 2001 From: Derek Hulley Date: Fri, 12 May 2006 14:35:59 +0000 Subject: [PATCH] Tweaks to some methods that were heavily used. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2877 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../repo/search/impl/lucene/LuceneIndexerImpl.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source/java/org/alfresco/repo/search/impl/lucene/LuceneIndexerImpl.java b/source/java/org/alfresco/repo/search/impl/lucene/LuceneIndexerImpl.java index 80258c6883..b9678c8600 100644 --- a/source/java/org/alfresco/repo/search/impl/lucene/LuceneIndexerImpl.java +++ b/source/java/org/alfresco/repo/search/impl/lucene/LuceneIndexerImpl.java @@ -801,7 +801,7 @@ public class LuceneIndexerImpl extends LuceneBase implements LuceneIndexer if (commandList.size() > 0) { Command last = commandList.get(commandList.size() - 1); - if ((last.action == command.action) && (last.nodeRef.equals(command.nodeRef))) + if (last.action == command.action) { return; } @@ -842,7 +842,7 @@ public class LuceneIndexerImpl extends LuceneBase implements LuceneIndexer Command current = it.previous(); if (matchExact) { - if ((current.action == command.action) && (current.nodeRef.equals(command.nodeRef))) + if (current.action == command.action) { it.remove(); return; @@ -1738,6 +1738,11 @@ public class LuceneIndexerImpl extends LuceneBase implements LuceneIndexer { // Document document = helper.document; NodeRef ref = helper.nodeRef; + // bypass nodes that have disappeared + if (!nodeService.exists(ref)) + { + continue; + } List docs = createDocuments(ref, false, true, false); for (Document doc : docs)