From 664405fb418e4e985b6ed9df9f1e7393a97b4aba Mon Sep 17 00:00:00 2001 From: Matthew Davis Date: Fri, 10 Dec 2021 07:59:46 -0500 Subject: [PATCH] handle npe for facets --- .../src/main/java/io/zulia/server/index/ShardReader.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zulia-server/src/main/java/io/zulia/server/index/ShardReader.java b/zulia-server/src/main/java/io/zulia/server/index/ShardReader.java index 4e7c8bd8..50e79039 100644 --- a/zulia-server/src/main/java/io/zulia/server/index/ShardReader.java +++ b/zulia-server/src/main/java/io/zulia/server/index/ShardReader.java @@ -305,7 +305,9 @@ else if (statRequest.getShardFacets() == 0) { if (indexConfig.isHierarchicalFacet(label)) { List topChildren = facets.getTopChildren(statRequest.getNumericField(), numOfFacets, label, statRequest.getFacetField().getPathList().toArray(new String[0])); - statGroupBuilder.addAllFacetStats(topChildren); + if (topChildren != null) { + statGroupBuilder.addAllFacetStats(topChildren); + } } else { List topChildren = facets.getTopChildren(statRequest.getNumericField(), numOfFacets, label,