mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-06-16 17:55:15 +00:00
Slight fix-up to getTopTerms result iterator (it was skipping over the first result)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7474 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
parent
d3d6959d6a
commit
1e89a663ef
@ -742,9 +742,11 @@ public class ADMLuceneSearcherImpl extends AbstractLuceneBase implements LuceneS
|
||||
searcher = getSearcher(indexer);
|
||||
IndexReader reader = searcher.getIndexReader();
|
||||
TermEnum terms = reader.terms(new Term(field, ""));
|
||||
while (terms.next())
|
||||
do
|
||||
{
|
||||
Term term = terms.term();
|
||||
if (term != null)
|
||||
{
|
||||
if(!term.field().equals(field))
|
||||
{
|
||||
break;
|
||||
@ -794,6 +796,7 @@ public class ADMLuceneSearcherImpl extends AbstractLuceneBase implements LuceneS
|
||||
// off the end
|
||||
}
|
||||
}
|
||||
} while (terms.next());
|
||||
terms.close();
|
||||
return answer;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user