Null_value isn't working

(Saggie) #1

I have created a mapping for a 'tweetb' type :

curl -XPUT http://www.mydomain:9200/twitter/tweetb/_mapping -d '{ "twitter": { "mappings": { "tweetb": { "properties": { "message": { "type": "string", "null_value": "NA" } } } } }'

Then I put one document curl -XPUT -d '{"message": null}'

and then I tried to get the inserted doc back:

curl -XGET http://www.mydomain:9200/twitter/tweetb/1 :

{"_index":"twitter","_type":"tweetb","_id":"1","_version":2,"found":true, "_source" : {"message": null}}

In _source field I was expecting "message":"NA" however looks like "null_value" isn't working to the purpose, am I missing something ?

(system) #2