NullPointerException for invalid faceted query, closes #1136.
This commit is contained in:
parent
c066b6ae4a
commit
0ed50ca00c
|
@ -127,6 +127,10 @@ public class FacetParseElement implements SearchParseElement {
|
||||||
facet = new NestedChildrenCollector(facet, context.filterCache().cache(NonNestedDocsFilter.INSTANCE), context.filterCache().cache(objectMapper.nestedTypeFilter()));
|
facet = new NestedChildrenCollector(facet, context.filterCache().cache(NonNestedDocsFilter.INSTANCE), context.filterCache().cache(objectMapper.nestedTypeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (facet == null) {
|
||||||
|
throw new SearchParseException(context, "no facet type found for facet named [" + topLevelFieldName + "]");
|
||||||
|
}
|
||||||
|
|
||||||
if (facetCollectors == null) {
|
if (facetCollectors == null) {
|
||||||
facetCollectors = Lists.newArrayList();
|
facetCollectors = Lists.newArrayList();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue