From 9528d9d941a5b7fbbec17aa809629109f26ccd00 Mon Sep 17 00:00:00 2001 From: Derek Hulley Date: Wed, 4 Jan 2006 12:44:54 +0000 Subject: [PATCH] More concise error messages when root node entries are incorrect in index git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2071 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../repo/search/impl/lucene/query/LeafScorer.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/java/org/alfresco/repo/search/impl/lucene/query/LeafScorer.java b/source/java/org/alfresco/repo/search/impl/lucene/query/LeafScorer.java index fe05f1a671..ace9556e73 100644 --- a/source/java/org/alfresco/repo/search/impl/lucene/query/LeafScorer.java +++ b/source/java/org/alfresco/repo/search/impl/lucene/query/LeafScorer.java @@ -215,9 +215,13 @@ public class LeafScorer extends Scorer counter.count++; } } - if (parentIds.size() != 1) + if (parentIds.size() > 1) { - throw new SearcherException("More than one root node? " + parentIds.size()); + throw new SearcherException("More than one root node in index: " + parentIds.size()); + } + else if (parentIds.size() == 0) + { + throw new SearcherException("Index has no root node. Check that the correct index locations are being used."); } }