gg gg
gg gg

Reputation: 129

Elasticsearch declare field as null

I would like to declare a field to null not with null_value.

Are "" and null equivalent? If I do not write anything to field, will ES set set the null automatically?

Upvotes: 1

Views: 1483

Answers (1)

Taras Kohut
Taras Kohut

Reputation: 2555

If you want the field to be null just don't index it.

"" (empty string) is a non-null value (see the doc), and will be stored in the document (but not in the inverted index).

Upvotes: 3

Related Questions