Skip to content

Instantly share code, notes, and snippets.

@tmacam
Created January 17, 2014 12:50
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 tmacam/8472874 to your computer and use it in GitHub Desktop.
Save tmacam/8472874 to your computer and use it in GitHub Desktop.
# just in case
curl -XDELETE http://localhost:9200/inall
curl -XPUT http://localhost:9200'/inall/' -d '{
"mappings": {
"thing": {
"include_in_all": false,
"type": "object",
"_all" : {
"enabled" : true
},
"properties" : {
"data" : {
"type" : "string",
"include_in_all": true
},
"contents" : {
"type" : "string",
"include_in_all": true
},
"ignoreme" : {
"type" : "string"
}
}
}
}
}'
curl -XPUT 'http://localhost:9200/inall/thing/1' -d '
{
"data": "new useful stuff",
"contents": "place something interesting here",
"ignoreme": "garbage dump",
"ignoremetoo": "old trash"
}'
# should result empty, right?
curl -XGET 'http://localhost:9200/inall/thing/_search?q=old+garbage'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment