# Multiple Filters Query

**URL:** <https://discuss.elastic.co/t/multiple-filters-query/172813>\
**Category:** Elasticsearch\
**Created:** [March 18, 2019, 4:06pm UTC](https://discuss.elastic.co/t/multiple-filters-query/172813 "2019-03-18T16:06:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vincent\_Stevenson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vincent_stevenson/32/48477_2.png) [@Vincent\_Stevenson](https://discuss.elastic.co/u/Vincent_Stevenson)\
**Post date:** [March 18, 2019, 4:06pm UTC](https://discuss.elastic.co/t/multiple-filters-query/172813/1 "2019-03-18T16:06:27Z")

</div>

I indexed some movie data. Each movie has a Genre field that sometimes contains an array of keywords (ex: "Comedy", "Action", "Romance").

When I do a query:  
GET movies/\_search  
{  
"query" : {  
"bool" : {  
"must" : {"match" : {"Genre" : "Comedy"}}  
}  
}  
}

The above query returns only movies that have **only** Comedy as its Genre, if the document's Genre is "Comedy", "Action", I don't see it. How do I do a search so that I can see all movies that have "Comedy" as one of its Genres.

Thanks!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 18, 2019, 4:27pm UTC](https://discuss.elastic.co/t/multiple-filters-query/172813/2 "2019-03-18T16:27:17Z")

</div>

I can't reproduce your problem with this:

```auto
DELETE test
PUT test/_doc/1
{
  "genre": ["Comedy", "Action", "Romance"]
}
PUT test/_doc/2
{
  "genre": ["Comedy"]
}
GET test/_search
{
  "query": {
    "bool": {
      "must": {
        "match": {
          "genre": "Comedy"
        }
      }
    }
  }
}

```

It gives:

```auto
{
  "took" : 6,
  "timed_out" : false,
  "_shards" : {
    "total" : 5,
    "successful" : 5,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : 2,
    "max_score" : 0.2876821,
    "hits" : [
      {
        "_index" : "test",
        "_type" : "_doc",
        "_id" : "2",
        "_score" : 0.2876821,
        "_source" : {
          "genre" : [
            "Comedy"
          ]
        }
      },
      {
        "_index" : "test",
        "_type" : "_doc",
        "_id" : "1",
        "_score" : 0.2876821,
        "_source" : {
          "genre" : [
            "Comedy",
            "Action",
            "Romance"
          ]
        }
      }
    ]
  }
}

```

---

<div class="post-metadata">

**Author:** ![Vincent\_Stevenson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vincent_stevenson/32/48477_2.png) [@Vincent\_Stevenson](https://discuss.elastic.co/u/Vincent_Stevenson)\
**Post date:** [March 18, 2019, 5:22pm UTC](https://discuss.elastic.co/t/multiple-filters-query/172813/3 "2019-03-18T17:22:57Z")

</div>

I posted json into the index incorrectly, sorry about that. You are right, thank you!

---

<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:** [April 15, 2019, 5:23pm UTC](https://discuss.elastic.co/t/multiple-filters-query/172813/4 "2019-04-15T17:23:02Z")

</div>

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