Update field to null


(Sannthosh) #1

I'm java client for elastic search.. I need to update my field(type:date) date to Null.
For example
exp_date : "2017-01-01T18-15-12-345Z"
to
exp_date:null
???


(Ryan Ernst) #2

null is not something indexable in lucene. In elasticsearch, finding a null in the json of a document being indexed means "replace with the null_value". null_value is essentially a default value you can specify in the mapping for a field. This is explained a bit better in the definitive guide: https://www.elastic.co/guide/en/elasticsearch/guide/current/_dealing_with_null_values.html


(Sannthosh) #3

thanks Ryan


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.