Skip to content

Instantly share code, notes, and snippets.

#
# cleanup
#
curl -XDELETE "http://localhost:9200/user"
#
# add documents
#
curl -XPOST "http://localhost:9200/user/profile/" -d '{"id": "p001", "fname": "foo", "lname": "bar"}'
curl -XPOST "http://localhost:9200/user/profile/" -d '{"id": "p002", "fname": "foo", "lname": "baz"}'
@hmrizin
hmrizin / gist:9645816
Last active August 29, 2015 13:57
Elasticsearch has_child queries throw error if queryName is set.
# cleanup
curl -XDELETE 'http://localhost:9200/twtest'
# create index mappings
curl -XPOST 'http://localhost:9200/twtest' -d '{
"mappings": {
"account": {
"_id": {
"path": "accountid"
},