# Match query

**URL:** https://discuss.elastic.co/t/match-query/304310
**Category:** Elasticsearch
**Created:** [May 10, 2022, 6:35am UTC](https://discuss.elastic.co/t/match-query/304310 "2022-05-10T06:35:46Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![RohitBR\_K](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rohitbr_k/32/103666_2.png) [@RohitBR\_K](https://discuss.elastic.co/u/RohitBR_K)
#### Post date: [May 10, 2022, 6:35am UTC](https://discuss.elastic.co/t/match-query/304310/1 "2022-05-10T06:35:46Z")

</div>

Can we add fields to match query like multi\_match , I can't add fuzziness to multi\_match with type phrase. I need to know how to add fields in match , if it can I can easily add fuzziness to fields in match query.

---

<div class="post-metadata">

### Author: ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)
#### Post date: [May 10, 2022, 12:13pm UTC](https://discuss.elastic.co/t/match-query/304310/2 "2022-05-10T12:13:49Z")

</div>

Hi.  
Are you looking for this:

> **[Match query | Elasticsearch Guide \[8.2\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query.html#query-dsl-match-query-fuzziness)**

---

<div class="post-metadata">

### Author: ![RohitBR\_K](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rohitbr_k/32/103666_2.png) [@RohitBR\_K](https://discuss.elastic.co/u/RohitBR_K)
#### Post date: [May 10, 2022, 12:17pm UTC](https://discuss.elastic.co/t/match-query/304310/3 "2022-05-10T12:17:10Z")

</div>

yes, but I need to add multiple fields like multi\_match

---

<div class="post-metadata">

### Author: ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)
#### Post date: [May 10, 2022, 12:41pm UTC](https://discuss.elastic.co/t/match-query/304310/4 "2022-05-10T12:41:55Z")

</div>

u can use fuzzy with multi-match.

---

<div class="post-metadata">

### Author: ![RohitBR\_K](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rohitbr_k/32/103666_2.png) [@RohitBR\_K](https://discuss.elastic.co/u/RohitBR_K)
#### Post date: [May 12, 2022, 6:57am UTC](https://discuss.elastic.co/t/match-query/304310/5 "2022-05-12T06:57:04Z")

</div>

how ? it gives me error whenever i do with type phrase and phrase\_prefix

---

<div class="post-metadata">

### Author: ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)
#### Post date: [May 12, 2022, 12:40pm UTC](https://discuss.elastic.co/t/match-query/304310/6 "2022-05-12T12:40:41Z")

</div>

I don't understand. Do you want to use Multi Match or Match phrase prefix query?

---

<div class="post-metadata">

### Author: ![RohitBR\_K](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rohitbr_k/32/103666_2.png) [@RohitBR\_K](https://discuss.elastic.co/u/RohitBR_K)
#### Post date: [May 13, 2022, 6:29am UTC](https://discuss.elastic.co/t/match-query/304310/7 "2022-05-13T06:29:56Z")

</div>

am using multi\_match

---

<div class="post-metadata">

### Author: ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)
#### Post date: [May 13, 2022, 12:34pm UTC](https://discuss.elastic.co/t/match-query/304310/8 "2022-05-13T12:34:01Z")

</div>

I don't know if you already solved it but the fuzzy would look like this:

```
              {
                 "multi_match":{
                    "query":"teste",
                    "fields":[
                       "field1",
                       "field2"
                    ],
                    "type":"best_fields",
                    "operator":"OR",
                    "slop":0,
                    "fuzziness":"2",
                    "prefix_length":4,
                    "max_expansions":10,
                 }
              }
```

---

<div class="post-metadata">

### Author: ![RohitBR\_K](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rohitbr_k/32/103666_2.png) [@RohitBR\_K](https://discuss.elastic.co/u/RohitBR_K)
#### Post date: [May 14, 2022, 6:36am UTC](https://discuss.elastic.co/t/match-query/304310/9 "2022-05-14T06:36:05Z")

</div>

why we need to use best\_fields in type and slop=0

---

<div class="post-metadata">

### Author: ![RohitBR\_K](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rohitbr_k/32/103666_2.png) [@RohitBR\_K](https://discuss.elastic.co/u/RohitBR_K)
#### Post date: [May 14, 2022, 6:45am UTC](https://discuss.elastic.co/t/match-query/304310/10 "2022-05-14T06:45:51Z")

</div>

thanks bro

---

<div class="post-metadata">

### Author: ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)
#### Post date: [May 14, 2022, 4:07pm UTC](https://discuss.elastic.co/t/match-query/304310/11 "2022-05-14T16:07:30Z")

</div>

> [@RohitBR\_K](#):
>
> why we need to use best\_fields in type and slop=0

They are an example but for your search you must configure them correctly.

> **[Multi-match query | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html#multi-match-types)**

---

<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: [June 11, 2022, 4:08pm UTC](https://discuss.elastic.co/t/match-query/304310/12 "2022-06-11T16:08:14Z")

</div>

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