# How to find intersection of multiple queries

**URL:** <https://discuss.elastic.co/t/how-to-find-intersection-of-multiple-queries/218525>\
**Category:** Elasticsearch\
**Created:** [February 10, 2020, 7:15am UTC](https://discuss.elastic.co/t/how-to-find-intersection-of-multiple-queries/218525 "2020-02-10T07:15:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankitwandx](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankitwandx/32/48587_2.png) [@ankitwandx](https://discuss.elastic.co/u/ankitwandx)\
**Post date:** [February 10, 2020, 7:15am UTC](https://discuss.elastic.co/t/how-to-find-intersection-of-multiple-queries/218525/1 "2020-02-10T07:15:44Z")

</div>

My record looks like this:

> user\_uuid, keywords, timestamp

I need to find out the list of user\_uuids who searched for given keywords within a given timestamp.

However, there can be multiple conditions for finding user\_uuids. Basically, I want an intersection of the results for each condition.

I am stuck and can't seem to find any solution.

Ref: [how to write an Elasticsearch query having multiple conditions - Stack Overflow](https://stackoverflow.com/questions/59949450/how-to-write-an-elasticsearch-query-having-multiple-conditions)

Attempt: [query - Google Docs](https://docs.google.com/document/d/1kE4uwA9hP92EOTuImVl4WTOdhcaS93lwq2Auy03pwr8/edit)

---

<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 9, 2020, 7:15am UTC](https://discuss.elastic.co/t/how-to-find-intersection-of-multiple-queries/218525/2 "2020-03-09T07:15:52Z")

</div>

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