Date range filter for document with multiple dates

Hello Guys,

I am working with Event type of system. Where we have multiple dates for the same event like:

And the values are comma separated, like: 2017-06-03,2017-06-05,2017-06-07 and the data map is:

{
  "mappings": {
    "my_type": {
      "properties": {
        "event_date": {
          "type":   "date",
          "format": "yyyy-MM-dd"
        }
      }
    }
  }
}

But in this case the document is not able to index to elasticsearch.

Please help me, how I can index this and add the range filter?

Please format your code using </> icon as explained in this guide. It will make your post more readable.

Or use markdown style like:

```
CODE
```

I believe you can index that as:

{
  "event_date": [ "2017-06-02", "2017-06-04", "2017-06-06" ]
}

Unsure if this will solve your use case though.

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