Skip to content

Instantly share code, notes, and snippets.

@kulikov
Last active December 28, 2015 21:44
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save kulikov/ab2a82284a26a3eff864 to your computer and use it in GitHub Desktop.
echo '{
"query": {
"bool": {
"must": [
{ "terms": { "person": ["bob", "jake"] } },
{ "range": { "score": { "gt": 0 } } }
]
}
},
"aggs": {
"max": { "max": { "field": "score" } },
"min": { "min": { "field": "score" } },
"avg": { "avg": { "field": "score" } },
"sum": { "sum": { "field": "score" } }
}
}' | http http://127.0.0.1:9200/demo/_search
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment