Skip to content

Instantly share code, notes, and snippets.

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/7587188 to your computer and use it in GitHub Desktop.
Save mkommar/7587188 to your computer and use it in GitHub Desktop.
Adding a non-numeric item and asking for a suggestion
curl -X PUT 'localhost:9200/numbers/zipcode/3?refresh=true' -d '{
"name" : "Blah",
"suggest" : {
"input": [ "Blah" ],
"output": "Blah blah",
"payload" : { "area code" : 0 }
}
}'
curl -X POST 'localhost:9200/numbers/_suggest?pretty' -d '{
"numbers-suggest" : {
"text" : "bl",
"completion" : {
"field" : "suggest"
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment