Last active
October 9, 2018 13:08
-
-
Save dieterve/175e5023d84f8404dac2 to your computer and use it in GitHub Desktop.
Faceted search with globally filtered aggregations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"took": 153, | |
"timed_out": false, | |
"_shards": { | |
"total": 5, | |
"successful": 5, | |
"failed": 0 | |
}, | |
"hits": { | |
"total": 3, | |
"max_score": 0, | |
"hits": ["..."] | |
}, | |
"aggregations": { | |
"all_products": { | |
"doc_count": 21, | |
"filterted categories": { | |
"doc_count": 13, | |
"categories": { | |
"doc_count_error_upper_bound": 0, | |
"sum_other_doc_count": 0, | |
"buckets": [ | |
{ | |
"key": "movies", | |
"doc_count": 6 | |
}, | |
{ | |
"key": "music", | |
"doc_count": 4 | |
}, | |
{ | |
"key": "books", | |
"doc_count": 3 | |
} | |
] | |
} | |
}, | |
"filtered_countries": { | |
"doc_count": 15, | |
"countries": { | |
"doc_count_error_upper_bound": 0, | |
"sum_other_doc_count": 0, | |
"buckets": [ | |
{ | |
"key": "fr", | |
"doc_count": 6 | |
}, | |
{ | |
"key": "br", | |
"doc_count": 4 | |
}, | |
{ | |
"key": "be", | |
"doc_count": 3 | |
}, | |
{ | |
"key": "pt", | |
"doc_count": 2 | |
} | |
] | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment