Skip to content

Commit

Permalink
Merge pull request #3180 from atlanhq/plt-1665
Browse files Browse the repository at this point in the history
PLT-1665, master, fixed "track_total_hits": false gives an NPE
  • Loading branch information
mehtaanshul authored Jun 3, 2024
2 parents 469ce90 + 97283f7 commit 2e84ff7
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,10 @@ private DirectIndexQueryResult getResultFromResponse(Map<String, LinkedHashMap>
if (hits_0 == null) {
return result;
}
this.vertexTotals = (Integer) hits_0.get("total").get("value");
LinkedHashMap approximateCount = hits_0.get("total");
if (approximateCount != null) {
this.vertexTotals = (Integer) approximateCount.get("value");
}

List<LinkedHashMap> hits_1 = AtlasType.fromJson(AtlasType.toJson(hits_0.get("hits")), List.class);

Expand Down

0 comments on commit 2e84ff7

Please sign in to comment.