# Fuzzy query with term

**URL:** <https://discuss.elastic.co/t/fuzzy-query-with-term/182666>\
**Category:** Elasticsearch\
**Created:** [May 24, 2019, 1:55pm UTC](https://discuss.elastic.co/t/fuzzy-query-with-term/182666 "2019-05-24T13:55:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![inext3211](https://avatars.discourse-cdn.com/v4/letter/i/e79b87/32.png) [@inext3211](https://discuss.elastic.co/u/inext3211)\
**Post date:** [May 24, 2019, 1:55pm UTC](https://discuss.elastic.co/t/fuzzy-query-with-term/182666/1 "2019-05-24T13:55:42Z")

</div>

How can i use fuzzy query with term. it is working if i pass a single value on term like:-  
{  
"from": 0,  
"size": 1000,  
"query": {  
"bool": {  
"must": [  
{  
"fuzzy" : {  
"product\_name" : {  
"value": "man",  
"boost": 1.0,  
"fuzziness": 2,  
"prefix\_length": 0,  
"max\_expansions": 100  
}  
}  
},  
{  
"bool": {  
"must":  
{  
"term": {  
"shop\_available": 1 **\<=== this value**  
}  
}

```
      }
    }
  ]
}

```

}  
}

But what if i want to pass array in term like:-

{  
"from": 0,  
"size": 1000,  
"query": {  
"bool": {  
"must": [  
{  
"fuzzy" : {  
"product\_name" : {  
"value": "man",  
"boost": 1.0,  
"fuzziness": 2,  
"prefix\_length": 0,  
"max\_expansions": 100  
}  
}  
},  
{  
"bool": {  
"must":  
{  
"term": {  
"shop\_available": [1] **\<=== this value**  
}  
}

```
      }
    }
  ]
}

```

}  
}

---

<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 21, 2019, 2:00pm UTC](https://discuss.elastic.co/t/fuzzy-query-with-term/182666/2 "2019-06-21T14:00:46Z")

</div>

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