mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 23:27:25 -04:00
Update expected test output (#102412)
A `having` bucket selector errors out when applied to a doc lacking the expected value in the `buckets_path`. The existing yaml test didn't reflect that but assumes that such docs don't affect results. Adding a refresh in the bulk operation exposes this problem. Fixes #102295
This commit is contained in:
parent
8616178831
commit
fb19e49117
1 changed files with 3 additions and 7 deletions
|
@ -600,10 +600,13 @@ synthetic _source:
|
||||||
- do:
|
- do:
|
||||||
bulk:
|
bulk:
|
||||||
index: test2
|
index: test2
|
||||||
|
refresh: true
|
||||||
body:
|
body:
|
||||||
- { index: { } }
|
- { index: { } }
|
||||||
- { gender: 3 }
|
- { gender: 3 }
|
||||||
- do:
|
- do:
|
||||||
|
# The script can't process a bucket without a salary value for gender '3'.
|
||||||
|
catch: /path not supported for \[top_salary_hits\]:\ \[_source.salary\]./
|
||||||
search:
|
search:
|
||||||
index: test2
|
index: test2
|
||||||
size: 0
|
size: 0
|
||||||
|
@ -630,13 +633,6 @@ synthetic _source:
|
||||||
ts: top_salary_hits[_source.salary]
|
ts: top_salary_hits[_source.salary]
|
||||||
script: "params.ts < 8000"
|
script: "params.ts < 8000"
|
||||||
|
|
||||||
# Empty bucket for gender '3' affects nothing.
|
|
||||||
- length: { aggregations.genders.buckets: 1}
|
|
||||||
- match: { aggregations.genders.buckets.0.top_salary_hits.hits.total.value: 4}
|
|
||||||
- match: { aggregations.genders.buckets.0.top_salary_hits.hits.hits.0._source.gender: 1}
|
|
||||||
- match: { aggregations.genders.buckets.0.top_salary_hits.hits.hits.0._source.salary: 4000}
|
|
||||||
- match: { aggregations.genders.buckets.0.top_salary_hits.hits.hits.0._source.birth_date: 1982}
|
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
catch: /path not supported for \[top_salary_hits\]:\ \[_source.nosuchfield\]./
|
catch: /path not supported for \[top_salary_hits\]:\ \[_source.nosuchfield\]./
|
||||||
search:
|
search:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue