aboutsummaryrefslogtreecommitdiffstats
path: root/tests/files/search/GET_search_agg_filter.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/files/search/GET_search_agg_filter.txt')
-rw-r--r--tests/files/search/GET_search_agg_filter.txt28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/files/search/GET_search_agg_filter.txt b/tests/files/search/GET_search_agg_filter.txt
new file mode 100644
index 0000000..538380a
--- /dev/null
+++ b/tests/files/search/GET_search_agg_filter.txt
@@ -0,0 +1,28 @@
+GET /shirts/_search
+{
+ "query": {
+ "bool": {
+ "filter": {
+ "term": { "brand": "gucci" }
+ }
+ }
+ },
+ "aggs": {
+ "colors": {
+ "terms": { "field": "color" }
+ },
+ "color_red": {
+ "filter": {
+ "term": { "color": "red" }
+ },
+ "aggs": {
+ "models": {
+ "terms": { "field": "model" }
+ }
+ }
+ }
+ },
+ "post_filter": {
+ "term": { "color": "red" }
+ }
+}