Created
October 20, 2015 12:49
-
-
Save cdahlqvist/24c316fb147fb9b44158 to your computer and use it in GitHub Desktop.
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 -XPOST http://localhost:9200/test/test -d'{ | |
"title": "one", | |
"total": 10 | |
}' | |
curl -XPOST http://localhost:9200/test/test -d'{ | |
"title": "one", | |
"total": 10 | |
}' | |
curl -XPOST http://localhost:9200/test/test -d'{ | |
"title": "two", | |
"total": 5 | |
}' | |
curl -XPOST http://localhost:9200/test/test -d'{ | |
"title": "two", | |
"total": 5 | |
}' | |
curl -XPOST http://localhost:9200/test/_search?pretty -d '{ | |
"query" : { "match_all" : {}}, | |
"size": 0, | |
"aggs": { | |
"title": { | |
"terms": { | |
"field": "title", | |
"size": 0 | |
}, | |
"aggs": { | |
"sum": { | |
"sum": { | |
"field": "total" | |
} | |
} | |
} | |
} | |
} | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment