# Need to write DSL to check if these 4 events occur within 1 second

**URL:** <https://discuss.elastic.co/t/need-to-write-dsl-to-check-if-these-4-events-occur-within-1-second/275096>\
**Category:** Elasticsearch\
**Created:** [June 7, 2021, 4:40am UTC](https://discuss.elastic.co/t/need-to-write-dsl-to-check-if-these-4-events-occur-within-1-second/275096 "2021-06-07T04:40:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhishek\_s1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhishek_s1/32/85080_2.png) [@abhishek\_s1](https://discuss.elastic.co/u/abhishek_s1)\
**Post date:** [June 7, 2021, 4:40am UTC](https://discuss.elastic.co/t/need-to-write-dsl-to-check-if-these-4-events-occur-within-1-second/275096/1 "2021-06-07T04:40:02Z")

</div>

```
1. 31628 2021-02-13T00:20:49.325893Z - xyz svn/repos open
2. 31628 2021-02-13T00:20:49.607437Z - xyz svn/repos get-latest
3. 31628 2021-02-13T00:20:49.888794Z - xyz svn/repos reparent 
4. 31628 2021-02-13T00:20:50.170101Z - xyz svn/repos stat`

```

I need to write DSL query such that, it should show up document groups like these (i.e., group of 4 documents with open, get-latest, reparent, stat). All 4 must be within one second range as shown in above logs.

Please help me, If this is possible with DSL.

---

<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:** [July 5, 2021, 4:40am UTC](https://discuss.elastic.co/t/need-to-write-dsl-to-check-if-these-4-events-occur-within-1-second/275096/2 "2021-07-05T04:40:59Z")

</div>

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