diff --git a/solr/src/java/org/apache/solr/handler/component/TermsComponent.java b/solr/src/java/org/apache/solr/handler/component/TermsComponent.java index 3386b81bfa3..1ac33c13acd 100644 --- a/solr/src/java/org/apache/solr/handler/component/TermsComponent.java +++ b/solr/src/java/org/apache/solr/handler/component/TermsComponent.java @@ -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;