mirror of https://github.com/apache/lucene.git
fix terms component for empty index
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@995533 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5bc959263b
commit
8f8132bdfc
|
@ -110,7 +110,7 @@ public class TermsComponent extends SearchComponent {
|
|||
NamedList fieldTerms = new NamedList();
|
||||
termsResult.add(field, fieldTerms);
|
||||
|
||||
Terms terms = lfields.terms(field);
|
||||
Terms terms = lfields == null ? null : lfields.terms(field);
|
||||
if (terms == null) {
|
||||
// no terms for this field
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue