Skip to content

Instantly share code, notes, and snippets.

@mkommar
Created November 21, 2013 18:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkommar/7586857 to your computer and use it in GitHub Desktop.
Save mkommar/7586857 to your computer and use it in GitHub Desktop.
Adding document to the type
curl -X PUT 'localhost:9200/numbers/zipcode/1?refresh=true' -d '{
"name" : "28269",
"suggest" : {
"input": [ "28269" ],
"output": "Zip Code - 28269",
"payload" : { "area code" : 704 }
}
}'
curl -X PUT 'localhost:9200/numbers/zipcode/2?refresh=true' -d '{
"name" : "90210",
"suggest" : {
"input": [ "90210" ],
"output": "Zip Code - 90210",
"payload" : { "area code" : 903 }
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment