Last active
January 21, 2018 18:17
-
-
Save mustafatoker/62f868dbea031ac5ce73ebc00ad5bbee to your computer and use it in GitHub Desktop.
ElasticSearch Query DSL of Fetch data from each category
This file contains hidden or 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
{ | |
"size" : 0, | |
"aggs": { | |
"group" : { | |
"terms" : { | |
"field" : "category_id" | |
}, | |
"aggs" : { | |
"group_docs" : { | |
"top_hits" : { | |
"size" : 5 | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment