Error Searching for the exact category name: NPE
@@ -34,6 +34,8 @@ import com.thinkbiganalytics.search.rest.model.UnknownTypeSearchResultData;
import com.thinkbiganalytics.search.rest.model.es.ElasticSearchRestSearchHit;
import com.thinkbiganalytics.search.rest.model.es.ElasticSearchRestSearchResponse;
+import org.springframework.util.CollectionUtils;
+
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
@@ -162,7 +164,9 @@ public class ElasticSearchRestSearchResultTransform {
List<HiveColumn> hiveColumns = new ArrayList<>();
List<Pair> highlightsList = new ArrayList<>();
+ if (!CollectionUtils.isEmpty(elasticSearchRestSearchHit.getHiveColumns())) {
hiveColumns.addAll(elasticSearchRestSearchHit.getHiveColumns());
+ }
for (Pair highlightPair : elasticSearchRestSearchHit.getHighlights()) {
String key = highlightPair.getKey();
