# Percolator - Match all words

**URL:** <https://discuss.elastic.co/t/percolator-match-all-words/17013>\
**Category:** Elasticsearch\
**Created:** [April 15, 2014, 4:15am UTC](https://discuss.elastic.co/t/percolator-match-all-words/17013 "2014-04-15T04:15:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Louis\_Rene\_Hache](https://avatars.discourse-cdn.com/v4/letter/l/8edcca/32.png) [@Louis\_Rene\_Hache](https://discuss.elastic.co/u/Louis_Rene_Hache)\
**Post date:** [April 15, 2014, 4:15am UTC](https://discuss.elastic.co/t/percolator-match-all-words/17013/1 "2014-04-15T04:15:17Z")

</div>

Hi

As shown in the example below, if I search for the string "New York", how  
can avoid retrieving document that are not an exact match?

curl -XPUT 'localhost:9201/cities/.percolator/1' -d '{  
"query" : {  
"match" : {  
"body" : "New Jersey"  
}  
}  
}'

# \>\>

{"\_index":"cities","\_type":".percolator","\_id":"1","\_version":1,"created":true}

curl -XGET 'localhost:9201/cities/city/\_percolate' -d '{  
"doc" : {  
"body" : "New York"  
}  
}'

# \>\>

{"took":4,"\_shards":{"total":5,"successful":5,"failed":0},"total":1,"matches":[{"\_index":"cities","\_id":"1"}]}

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/72c490fe-0b17-4bfd-82b9-3426dcf35c47%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/72c490fe-0b17-4bfd-82b9-3426dcf35c47%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [April 15, 2014, 9:05am UTC](https://discuss.elastic.co/t/percolator-match-all-words/17013/2 "2014-04-15T09:05:45Z")

</div>

May be this? [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-match-query.html#\_phrase](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-match-query.html#_phrase)

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 15 avril 2014 à 06:15:21, Louis-René Haché ([talktome@lrhache.com](mailto:talktome@lrhache.com)) a écrit:

Hi

As shown in the example below, if I search for the string "New York", how can avoid retrieving document that are not an exact match?

curl -XPUT 'localhost:9201/cities/.percolator/1' -d '{  
"query" : {  
"match" : {  
"body" : "New Jersey"  
}  
}  
}'

# \>\> {"\_index":"cities","\_type":".percolator","\_id":"1","\_version":1,"created":true}

curl -XGET 'localhost:9201/cities/city/\_percolate' -d '{  
"doc" : {  
"body" : "New York"  
}  
}'

# \>\> {"took":4,"\_shards":{"total":5,"successful":5,"failed":0},"total":1,"matches":[{"\_index":"cities","\_id":"1"}]}

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/72c490fe-0b17-4bfd-82b9-3426dcf35c47%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/72c490fe-0b17-4bfd-82b9-3426dcf35c47%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.534cf669.6b8b4567.122b9%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.534cf669.6b8b4567.122b9%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Louis\_Rene\_Hache](https://avatars.discourse-cdn.com/v4/letter/l/8edcca/32.png) [@Louis\_Rene\_Hache](https://discuss.elastic.co/u/Louis_Rene_Hache)\
**Post date:** [April 15, 2014, 11:09am UTC](https://discuss.elastic.co/t/percolator-match-all-words/17013/3 "2014-04-15T11:09:38Z")

</div>

This works well! Thanks a lot!

On Tuesday, April 15, 2014 5:05:45 AM UTC-4, David Pilato wrote:

> May be this?  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-match-query.html#_phrase)
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 15 avril 2014 à 06:15:21, Louis-René Haché ([talk...@lrhache.com](mailto:talk...@lrhache.com)\<javascript:\>)  
> a écrit:
> 
> Hi
> 
> As shown in the example below, if I search for the string "New York", how  
> can avoid retrieving document that are not an exact match?
> 
> curl -XPUT 'localhost:9201/cities/.percolator/1' -d '{  
> "query" : {  
> "match" : {  
> "body" : "New Jersey"  
> }  
> }  
> }'
> 
> # \>\>
> 
> {"\_index":"cities","\_type":".percolator","\_id":"1","\_version":1,"created":true}
> 
> curl -XGET 'localhost:9201/cities/city/\_percolate' -d '{  
> "doc" : {  
> "body" : "New York"  
> }  
> }'
> 
> # \>\>
> 
> {"took":4,"\_shards":{"total":5,"successful":5,"failed":0},"total":1,"matches":[{"\_index":"cities","\_id":"1"}]}
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/72c490fe-0b17-4bfd-82b9-3426dcf35c47%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/72c490fe-0b17-4bfd-82b9-3426dcf35c47%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/72c490fe-0b17-4bfd-82b9-3426dcf35c47%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/72c490fe-0b17-4bfd-82b9-3426dcf35c47%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8d973a1d-b9d6-4d59-a558-f6a2b699e36d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8d973a1d-b9d6-4d59-a558-f6a2b699e36d%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:35am UTC](https://discuss.elastic.co/t/percolator-match-all-words/17013/4 "2017-07-06T01:35:46Z")

</div>


