# Multi\_match query with filters

**URL:** <https://discuss.elastic.co/t/multi-match-query-with-filters/35971>\
**Category:** Elasticsearch\
**Created:** [December 1, 2015, 12:44am UTC](https://discuss.elastic.co/t/multi-match-query-with-filters/35971 "2015-12-01T00:44:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juan\_Diego\_Calle](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juan_diego_calle/32/6037_2.png) [@Juan\_Diego\_Calle](https://discuss.elastic.co/u/Juan_Diego_Calle)\
**Post date:** [December 1, 2015, 12:44am UTC](https://discuss.elastic.co/t/multi-match-query-with-filters/35971/1 "2015-12-01T00:44:21Z")

</div>

I want to do a multi\_match query with filters and the only way I was able to do it was like this

```
{
  "query": {
    "bool": {
      "should": [
        {
          "multi_match": {
            "query": "auto bonito rojo en Guanajuato",
            "fields": [
              "attributes.description.value^9",
              "attributes.color.value^14",
              "attributes.province.value^6"
            ]
          }
        }
      ],
      "must": {
        "range": {
          "attributes.price.value": {
            "lte": 10000
          }
        }
      }
    }
  }
}

```

So the above works, but if I would like to have a "multi\_match" and for example "range" under the same must I have problems , I tried this

```
{
  "query": {
    "bool": {
      "must": [
        {
          "multi_match": {
            "query": "auto bonito rojo en Guanajuato",
            "fields": [
              "attributes.description.value^9",
              "attributes.color.value^14",
              "attributes.province.value^6"
            ]
          },
          "range": {
            "attributes.price.value": {
              "lte": 10000
            }
          }
        }
      ]
    }
  }
}

```

I get this error "type": "query\_parsing\_exception" with "reason": "No query registered for [attributes.price.value]".

If I have a "multi\_match" under "must", "filter", "must\_not", "should", can I have other types like "terms", "range", "match" in the same "must", "filter",etc.

I tried adding filters to this type of multi\_match

```
{
  "query": {
    "multi_match": {
      "query": "auto bonito rojo en Distrito Federal",
      "fields": [
        "attributes.description.value^49.1",
        "attributes.color.value^442.9",
        "attributes.province.value^12997980.9"
      ]
    }
  }
}

```

But i got errors.

Which is the best way to do this?

---

<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, 2017, 11:34pm UTC](https://discuss.elastic.co/t/multi-match-query-with-filters/35971/2 "2017-07-05T23:34:41Z")

</div>


