Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Elastic search nested aggregate with nested query
GET influencers/_search
{
"size": 0,
"aggregations": {
"influencers": {
"nested": {
"path": "interests"
},
"aggs": {
"names": {
"filter": {
"bool": {
"must": [
{
"match": {
"interests.name": "Travel destinations"
}
}
]
}
},
"aggs": {
"max_score": {
"max": {
"field": "interests.score"
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.