M
M
MOTORIST2016-07-28 23:56:13
elasticsearch
MOTORIST, 2016-07-28 23:56:13

How to force elasticsearch to have null in date type field?

Hello!
In mappings:

"Date": {
          "properties": {
            "Full": {
              "type": "date",
              "index":"not_analyzed",
              "format": "yyyy-MM-dd",
              "null_value": "NULL"
            }
}

Error 400 (Bad Request): failed to parse [Date.Full] [type=mapper_parsing_exception]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MherArsh, 2017-10-01
@MherArsh

No, the null_value type must match the field type, the date type, and you want to write a string to it, and therefore it swears, in such cases you can write a null date: "0001-01-01"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question