diff options
author | Jim Ferenczi <jim.ferenczi@elastic.co> | 2017-05-17 14:15:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-17 14:15:40 +0200 |
commit | 67c41d2e77f5e27ab546ab5d3519639fb833b371 (patch) | |
tree | 805b0027b0d010f74c097057cde28e0e08cbc682 /rest-api-spec/src | |
parent | cf846af0e508e4626fde3b9b870118f64cc33cb9 (diff) |
Fix ExpandSearchPhase when response contains no hits (#24688)
This change skips the expand search phase entirely when there is no search hits in the response.
Diffstat (limited to 'rest-api-spec/src')
-rw-r--r-- | rest-api-spec/src/main/resources/rest-api-spec/test/search/110_field_collapsing.yml | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search/110_field_collapsing.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/110_field_collapsing.yml index dd17399d31..9d3fc349a2 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search/110_field_collapsing.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/110_field_collapsing.yml @@ -147,7 +147,6 @@ setup: - match: { hits.hits.2.inner_hits.sub_hits.hits.hits.0._id: "5" } - match: { hits.hits.2.inner_hits.sub_hits.hits.hits.1._id: "4" } - --- "field collapsing, inner_hits and maxConcurrentGroupRequests": @@ -247,3 +246,22 @@ setup: match_all: {} query_weight: 1 rescore_query_weight: 2 + +--- +"no hits and inner_hits": + + - skip: + version: " - 5.4.0" + reason: "bug fixed in 5.4.1" + + - do: + search: + index: test + type: test + body: + size: 0 + collapse: { field: numeric_group, inner_hits: { name: sub_hits, size: 1} } + sort: [{ sort: desc }] + + - match: { hits.total: 6 } + - length: { hits.hits: 0 } |