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
# | |
# 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"}' |
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
# cleanup | |
curl -XDELETE 'http://localhost:9200/twtest' | |
# create index mappings | |
curl -XPOST 'http://localhost:9200/twtest' -d '{ | |
"mappings": { | |
"account": { | |
"_id": { | |
"path": "accountid" | |
}, |