Skip to content

Commit

Permalink
Request sort in rest_total_hits_as_int tests (#493)
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Wick <[email protected]>
  • Loading branch information
awick authored Aug 12, 2024
1 parent 597ed8d commit cb320b5
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions tests/default/_core/search/rest_total_hits_as_int.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ prologues:
director: Bennett Miller
title: Moneyball
year: 2011
order: 1
status: [201]
- path: /movies/_doc
method: POST
Expand All @@ -21,6 +22,7 @@ prologues:
director: Nicolas Winding Refn
title: Drive
year: 2011
order: 2
status: [201]
epilogues:
- path: /movies
Expand All @@ -37,26 +39,26 @@ chapters:
payload:
query:
match_all: {}
sort: order
response:
status: 200
payload:
timed_out: false
hits:
total: 2
max_score: 1
hits:
- _index: movies
_score: 1
_source:
director: Bennett Miller
title: Moneyball
year: 2011
order: 1
- _index: movies
_score: 1
_source:
director: Nicolas Winding Refn
title: Drive
year: 2011
order: 2
- synopsis: Search with rest_total_hits_as_int=false.
path: /{index}/_search
parameters:
Expand All @@ -67,6 +69,7 @@ chapters:
payload:
query:
match_all: {}
sort: order
response:
status: 200
payload:
Expand All @@ -75,20 +78,19 @@ chapters:
total:
value: 2
relation: eq
max_score: 1
hits:
- _index: movies
_score: 1
_source:
director: Bennett Miller
title: Moneyball
year: 2011
order: 1
- _index: movies
_score: 1
_source:
director: Nicolas Winding Refn
title: Drive
year: 2011
order: 2
- synopsis: Search with rest_total_hits_as_int=false track_total_hits=1.
path: /{index}/_search
parameters:
Expand All @@ -100,6 +102,7 @@ chapters:
track_total_hits: 1
query:
match_all: {}
sort: order
response:
status: 200
payload:
Expand All @@ -108,18 +111,17 @@ chapters:
total:
value: 1
relation: gte
max_score: 1
hits:
- _index: movies
_score: 1
_source:
director: Bennett Miller
title: Moneyball
year: 2011
order: 1
- _index: movies
_score: 1
_source:
director: Nicolas Winding Refn
title: Drive
year: 2011
order: 2

0 comments on commit cb320b5

Please sign in to comment.