Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@dadoonet
Created March 21, 2012 07:24
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 dadoonet/2145457 to your computer and use it in GitHub Desktop.
Save dadoonet/2145457 to your computer and use it in GitHub Desktop.
ES : Trying to play with default values
#!/bin/bash
ES='http://localhost:9200'
ESIDX='test3'
ESTYPE='test'
curl -XDELETE $ES/$ESIDX/$ESTYPE
curl -XPUT $ES/$ESIDX/$ESTYPE/_mapping -d '{
"test" : {
"properties" : {
"objectifs" : {"type" : "string", "null_value":"na"}
}
}
}'
curl -XPUT $ES/$ESIDX/$ESTYPE/1 -d '{
"objectifs" : null
}'
curl -XGET $ES/$ESIDX/$ESTYPE/1?pretty=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment