# How to use operators in elasticsearch percolator query?

**URL:** <https://discuss.elastic.co/t/how-to-use-operators-in-elasticsearch-percolator-query/17459>\
**Category:** Elasticsearch\
**Created:** [May 12, 2014, 12:45pm UTC](https://discuss.elastic.co/t/how-to-use-operators-in-elasticsearch-percolator-query/17459 "2014-05-12T12:45:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yatish\_gupta](https://avatars.discourse-cdn.com/v4/letter/y/48db29/32.png) [@yatish\_gupta](https://discuss.elastic.co/u/yatish_gupta)\
**Post date:** [May 12, 2014, 12:45pm UTC](https://discuss.elastic.co/t/how-to-use-operators-in-elasticsearch-percolator-query/17459/1 "2014-05-12T12:45:42Z")

</div>

Hi have installed ES 1.0.1 and tried to check the percolator query with AND  
operator.

Added a query to percolator:

curl -XPUT 'localhost:9200/testperc/.percolator/1' -d  
'{"query":{"match":{"message" : "hero AND shine"}}}'

When tried to check for "hero" word that query is matching ideally it  
should not happen.

curl -XGET 'localhost:9200/testperc/message/\_percolate' -d '{"doc" :  
{"message" : "hero"}}'  
{"took":10,"\_shards":{"total":5,"successful":5,"failed":0},"total":1,"matches":[{"\_index":"testperc","\_id":"1"}]}

Please help me how can i use the operators in percolator query?

--  
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/3abd96e1-6abb-4411-915b-9c24a352ba23%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3abd96e1-6abb-4411-915b-9c24a352ba23%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:30am UTC](https://discuss.elastic.co/t/how-to-use-operators-in-elasticsearch-percolator-query/17459/2 "2017-07-06T01:30:09Z")

</div>


