# Nested array contain many problem

**URL:** <https://discuss.elastic.co/t/nested-array-contain-many-problem/249610>\
**Category:** Elasticsearch\
**Created:** [September 23, 2020, 5:57am UTC](https://discuss.elastic.co/t/nested-array-contain-many-problem/249610 "2020-09-23T05:57:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mich4s](https://avatars.discourse-cdn.com/v4/letter/m/90db22/32.png) [@mich4s](https://discuss.elastic.co/u/mich4s)\
**Post date:** [September 23, 2020, 5:57am UTC](https://discuss.elastic.co/t/nested-array-contain-many-problem/249610/1 "2020-09-23T05:57:41Z")

</div>

Hello, I cannot find anywhere example of that kind of query.

What I need to achieve is filter that kind of documents:

```auto
 {
    "id": "11097a6a-2f9c-4717-9b21-4d675727b879",
    "options": [
      "ONE", "TWO", "FOUR"
    ]
}

```

By providing array of options f.e. ["ONE", "TWO"]. I need document to contain all options from query. Cannot find anywhere how to do this. Any hint?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 23, 2020, 6:11am UTC](https://discuss.elastic.co/t/nested-array-contain-many-problem/249610/2 "2020-09-23T06:11:00Z")

</div>

Have you looked at the [terms set query](https://www.elastic.co/guide/en/elasticsearch/reference/7.9/query-dsl-terms-set-query.html)?

---

<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:** [October 21, 2020, 6:11am UTC](https://discuss.elastic.co/t/nested-array-contain-many-problem/249610/3 "2020-10-21T06:11:10Z")

</div>

Closed on October 21, 2020, 6:11am UTC

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