# Fuzzy search with AND query in REST Query DSL

**URL:** <https://discuss.elastic.co/t/fuzzy-search-with-and-query-in-rest-query-dsl/3631>\
**Category:** Elasticsearch\
**Created:** [December 6, 2010, 1:17am UTC](https://discuss.elastic.co/t/fuzzy-search-with-and-query-in-rest-query-dsl/3631 "2010-12-06T01:17:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Selva](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/selva/32/3300_2.png) [@Selva](https://discuss.elastic.co/u/Selva)\
**Post date:** [December 6, 2010, 1:17am UTC](https://discuss.elastic.co/t/fuzzy-search-with-and-query-in-rest-query-dsl/3631/1 "2010-12-06T01:17:25Z")

</div>

What is the DSL for making a fuzzy search on a field against multiple  
fields with either AND or OR operator.

Im able to make queries having "AND" / "OR" operator with the simple  
search call as a query string. Want to do the same thing with the REST  
Query dsl to have more control over the query.

Thanks  
Selva

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [December 6, 2010, 11:08am UTC](https://discuss.elastic.co/t/fuzzy-search-with-and-query-in-rest-query-dsl/3631/2 "2010-12-06T11:08:29Z")

</div>

Hi Selva

> Im able to make queries having "AND" / "OR" operator with the simple  
> search call as a query string. Want to do the same thing with the REST  
> Query dsl to have more control over the query.

Please read the docs:  
[http://www.elasticsearch.com/docs/elasticsearch/rest\_api/query\_dsl/](http://www.elasticsearch.com/docs/elasticsearch/rest_api/query_dsl/)

If you have an example that isn't working, then ask the list for help  
with that specific example.

thanks

clint

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [December 6, 2010, 6:00pm UTC](https://discuss.elastic.co/t/fuzzy-search-with-and-query-in-rest-query-dsl/3631/3 "2010-12-06T18:00:19Z")

</div>

Just a pointer, the "bool" query is the one that does the AND/OR logic. The must / must\_not, and should (with the option to specify minimum number of should to match) clauses allows you to play with it. Each clause is a fully fledged query as well.  
On Monday, December 6, 2010 at 1:08 PM, Clinton Gormley wrote:

> Hi Selva
> 
> > Im able to make queries having "AND" / "OR" operator with the simple  
> > search call as a query string. Want to do the same thing with the REST  
> > Query dsl to have more control over the query.
> 
> Please read the docs:  
> [http://www.elasticsearch.com/docs/elasticsearch/rest\_api/query\_dsl/](http://www.elasticsearch.com/docs/elasticsearch/rest_api/query_dsl/)
> 
> If you have an example that isn't working, then ask the list for help  
> with that specific example.
> 
> thanks
> 
> clint

---

<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 6, 2017, 4:15am UTC](https://discuss.elastic.co/t/fuzzy-search-with-and-query-in-rest-query-dsl/3631/4 "2017-07-06T04:15:39Z")

</div>


