# Output recurring events multiple times in a range query

**URL:** <https://discuss.elastic.co/t/output-recurring-events-multiple-times-in-a-range-query/119631>\
**Category:** Elasticsearch\
**Created:** [February 13, 2018, 12:30pm UTC](https://discuss.elastic.co/t/output-recurring-events-multiple-times-in-a-range-query/119631 "2018-02-13T12:30:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wullschi](https://avatars.discourse-cdn.com/v4/letter/w/9dc877/32.png) [@Wullschi](https://discuss.elastic.co/u/Wullschi)\
**Post date:** [February 13, 2018, 12:30pm UTC](https://discuss.elastic.co/t/output-recurring-events-multiple-times-in-a-range-query/119631/1 "2018-02-13T12:30:04Z")

</div>

Hi,

my indexed documents should represent events with a certain starting date. Some of those events can be reccuring. Every event has a nested date property which indicates the starting date of the event. If it is a recurring event, multiple starting dates are added. Let's say I've indexed two events, one of them recurring:

```
PUT events/event/1
{
    "event" : [{
        "date": 01.01.2018
    },
    {
      "date": 01.03.2018
    }]
}

PUT events/event/2
{
    "event" : [{
        "date": 01.02.2018
    }]
}

```

Now let's say I want to query all events which have a starting date between 01.01.2018 and 01.03.2018, sorted ascending by date. Is there any possibility to output event 1 twice so that the result would be:

- event 1 with a date of 01.01.2018
- event 2 with a date of 01.02.2018
- event 1 with a date of 01.03.2018

Or do I have to index event 1 twice with two different dates?

Thanks for your Help!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 13, 2018, 12:30pm UTC](https://discuss.elastic.co/t/output-recurring-events-multiple-times-in-a-range-query/119631/2 "2018-03-13T12:30:38Z")

</div>

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