File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.aggregation Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,7 @@ setup:
124124 - match : { aggregations.courses.sessions.names.buckets.0.doc_count: 4}
125125 - match : { aggregations.courses.sessions.names.buckets.1.key: "spr2021" }
126126 - match : { aggregations.courses.sessions.names.buckets.1.doc_count: 4}
127+
127128---
128129" Nested then filter then nested then terms " :
129130 - do :
@@ -160,3 +161,36 @@ setup:
160161 - match : { aggregations.courses.highpass_filter.sessions.names.buckets.0.doc_count: 3}
161162 - match : { aggregations.courses.highpass_filter.sessions.names.buckets.1.key: "spr2021" }
162163 - match : { aggregations.courses.highpass_filter.sessions.names.buckets.1.doc_count: 3}
164+
165+ ---
166+ " Nested then filter then nested then reverse nested " :
167+ - do :
168+ search :
169+ index : test
170+ body :
171+ aggregations :
172+ courses :
173+ nested :
174+ path : courses
175+ aggregations :
176+ highpass_filter :
177+ filter :
178+ range :
179+ courses.credits :
180+ gt : 1
181+ aggregations :
182+ unnest :
183+ reverse_nested : {}
184+ aggregations :
185+ department :
186+ terms :
187+ field : department
188+ - match : {hits.total.value: 2}
189+ - match : {aggregations.courses.doc_count: 4}
190+ - match : {aggregations.courses.highpass_filter.doc_count: 3}
191+ - match : {aggregations.courses.highpass_filter.unnest.doc_count: 2}
192+ - length : { aggregations.courses.highpass_filter.unnest.department.buckets: 2 }
193+ - match : { aggregations.courses.highpass_filter.unnest.department.buckets.0.key: compsci }
194+ - match : { aggregations.courses.highpass_filter.unnest.department.buckets.0.doc_count: 1 }
195+ - match : { aggregations.courses.highpass_filter.unnest.department.buckets.1.key: math }
196+ - match : { aggregations.courses.highpass_filter.unnest.department.buckets.1.doc_count: 1 }
You can’t perform that action at this time.
0 commit comments