Skip to content

Commit

Permalink
iter
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnvg committed Sep 30, 2024
1 parent dca77d7 commit 49efe26
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,11 @@ public SortedMap<String, List<Integer>> getValuesWithOffsets(String field) {
}

public int getArrayValueCount(String field) {
return numValuesByField.getOrDefault(field, 0);
if (numValuesByField.containsKey(field)) {
return numValuesByField.get(field) + 1;
} else {
return 0;
}
}

public void recordOffset(String fieldName, String value) {
Expand Down

0 comments on commit 49efe26

Please sign in to comment.