Null_value in mapping for individual components of date_range

Mapping below.

Docs need to be able to have non-null start date and null end date.

How do I specify null_value for each date in date_range individually?

    {
  "de-mr-j-2019.06" : {
    "mappings" : {
      "date_detection" : false,
      "numeric_detection" : false,
      "properties" : {
        "@effective_time" : {
        "type" : "date",
        "null_value" : "1970-01-01T00:00:00+00:00"
        },
        "@effective_time_end" : {
          "type" : "date",
          "null_value" : "1970-01-01T00:00:00+00:00"
        },
        "@effective_time_range" : {
          "type" : "date_range"
        },

hey,

how about using an ingest processor of adding a date range field, if it is not part of the JSON? This way you don't need to use the null_value mapping.

--Alex

Alex, a good thought, i'll give it a try. Thanks!!

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