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
This commit is contained in:
Derek Hulley
2006-05-12 14:35:59 +00:00
parent f52cffbd77
commit 55393337ef

View File

@@ -801,7 +801,7 @@ public class LuceneIndexerImpl extends LuceneBase implements LuceneIndexer
if (commandList.size() > 0) if (commandList.size() > 0)
{ {
Command last = commandList.get(commandList.size() - 1); Command last = commandList.get(commandList.size() - 1);
if ((last.action == command.action) && (last.nodeRef.equals(command.nodeRef))) if (last.action == command.action)
{ {
return; return;
} }
@@ -842,7 +842,7 @@ public class LuceneIndexerImpl extends LuceneBase implements LuceneIndexer
Command current = it.previous(); Command current = it.previous();
if (matchExact) if (matchExact)
{ {
if ((current.action == command.action) && (current.nodeRef.equals(command.nodeRef))) if (current.action == command.action)
{ {
it.remove(); it.remove();
return; return;
@@ -1738,6 +1738,11 @@ public class LuceneIndexerImpl extends LuceneBase implements LuceneIndexer
{ {
// Document document = helper.document; // Document document = helper.document;
NodeRef ref = helper.nodeRef; NodeRef ref = helper.nodeRef;
// bypass nodes that have disappeared
if (!nodeService.exists(ref))
{
continue;
}
List<Document> docs = createDocuments(ref, false, true, false); List<Document> docs = createDocuments(ref, false, true, false);
for (Document doc : docs) for (Document doc : docs)