Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ setup:
---
"hits.total as an object":
- skip:
version: " - 6.99.99"
version: " - 7.99.99"
reason: hits.total is rendered as an object in 7.0.0

- do:
Expand Down Expand Up @@ -106,7 +106,7 @@ setup:

- do:
search:
size: 3
size: 0
track_total_hits: 4
body:
query:
Expand All @@ -116,6 +116,18 @@ setup:
- match: {hits.total.value: 4}
- match: {hits.total.relation: gte}

- do:
search:
size: 0
track_total_hits: 5
body:
query:
match:
foo: bar

- match: {hits.total.value: 5}
- match: {hits.total.relation: eq}

- do:
catch: /\[rest_total_hits_as_int\] cannot be used if the tracking of total hits is not accurate, got 100/
search:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ TotalHits getTotalHits() {
assert totalHitsRelation == Relation.EQUAL_TO;
return new TotalHits(totalHits, totalHitsRelation);
} else {
if (totalHits < trackTotalHitsUpTo) {
if (totalHits <= trackTotalHitsUpTo) {
return new TotalHits(totalHits, totalHitsRelation);
} else {
/*
Expand Down