Created
February 7, 2017 09:37
-
-
Save dr0i/e970054262bb8efa86035683fa395fa5 to your computer and use it in GitHub Desktop.
elasticsearch child aggregation: item owner
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
curl -XGET 'http://gaia.hbz-nrw.de:9200/resources/_search?pretty=true' -d ' | |
{ | |
"query" : { | |
"filtered" : { | |
"query" : { | |
"query_string" : { | |
"query" : "köln" | |
} | |
} | |
} | |
} | |
, | |
"aggs": { | |
"items": { | |
"children": { | |
"type" : "item"· | |
}, | |
"aggs": { | |
"top-isil": { | |
"terms": { | |
"field": "owner.id", | |
"size": 50 | |
} | |
} | |
} | |
} | |
} | |
} | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment