Skip to content

Instantly share code, notes, and snippets.

@johtani
Created October 31, 2013 12:04
Show Gist options
  • Save johtani/7248574 to your computer and use it in GitHub Desktop.
Save johtani/7248574 to your computer and use it in GitHub Desktop.
My local curl command erase single quotation, doc['year'].
curl -XPOST "http://httpbin.org/post" -d'
{
"script_fields": {
"correctYear": {
"script": "doc['year'].value - 1800"
}
},
"query": {
"term": {
"title": "crime"
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment