# Problem in percolate query

**URL:** <https://discuss.elastic.co/t/problem-in-percolate-query/4759>\
**Category:** Elasticsearch\
**Created:** [July 3, 2011, 6:51am UTC](https://discuss.elastic.co/t/problem-in-percolate-query/4759 "2011-07-03T06:51:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kartavya](https://avatars.discourse-cdn.com/v4/letter/k/65b543/32.png) [@Kartavya](https://discuss.elastic.co/u/Kartavya)\
**Post date:** [July 3, 2011, 6:51am UTC](https://discuss.elastic.co/t/problem-in-percolate-query/4759/1 "2011-07-03T06:51:45Z")

</div>

Hi All,

I am trying with following percolate query

$ curl -XPUT 'localhost:9200/\_percolator/pa\_percolate\_index/BU\_001' -d '{  
"query":{  
"field":{"TweetData":"google"}}}'

$ curl -XPUT 'localhost:9200/\_percolator/pa\_percolate\_index/BU\_002' -d '{  
"query":{  
"field":{"TweetData":"microsoft"}}}'

Now I am testing it as follows

$ curl -XGET 'localhost:9200/pa\_percolate\_index/type/\_percolate' -d '{  
"doc":{"TweetData":"google"}}'

Result is awesome:- {"ok":true,"matches":["BU\_001"]}

But When i try other doc as follows:

$ curl -XGET 'localhost:9200/pa\_percolate\_index/type/\_percolate' -d '{  
"doc":{"TweetData":"microsoft"}}'

Result comes: {"ok":true,"matches":["BU\_002","BU\_001"]}

It should be : {"ok":true,"matches":["BU\_002"]}

Please help me and let me know where I am making mistakes.

Regards,  
Pulkit Agrawal

---

<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:** [July 3, 2011, 12:34pm UTC](https://discuss.elastic.co/t/problem-in-percolate-query/4759/2 "2011-07-03T12:34:35Z")

</div>

Hiya

> $ curl -XGET 'localhost:9200/pa\_percolate\_index/type/\_percolate' -d  
> '{  
> "doc":{"TweetData":"microsoft"}}'

> Result comes: {"ok":true,"matches":["BU\_002","BU\_001"]}  
> It should be : {"ok":true,"matches":["BU\_002"]}

When I try your example on 0.16.2, it works correctly for me. Perhaps  
you have an earlier version of BU\_001 that is matching? Or you're  
running an older version of Elasticsearch?

clint

---

<div class="post-metadata">

**Author:** ![Kartavya](https://avatars.discourse-cdn.com/v4/letter/k/65b543/32.png) [@Kartavya](https://discuss.elastic.co/u/Kartavya)\
**Post date:** [July 3, 2011, 2:01pm UTC](https://discuss.elastic.co/t/problem-in-percolate-query/4759/3 "2011-07-03T14:01:29Z")

</div>

I am not having earlier version of BU\_001 because I try after deleting  
complete index couple of time.

I am using Elastic search 0.16.1

Any Idea?

On Sun, Jul 3, 2011 at 6:04 PM, Clinton Gormley [clinton@iannounce.co.uk](mailto:clinton@iannounce.co.uk)wrote:

> Hiya
> 
> > $ curl -XGET 'localhost:9200/pa\_percolate\_index/type/\_percolate' -d  
> > '{  
> > "doc":{"TweetData":"microsoft"}}'
> 
> > Result comes: {"ok":true,"matches":["BU\_002","BU\_001"]}  
> > It should be : {"ok":true,"matches":["BU\_002"]}
> 
> When I try your example on 0.16.2, it works correctly for me. Perhaps  
> you have an earlier version of BU\_001 that is matching? Or you're  
> running an older version of Elasticsearch?
> 
> 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:01am UTC](https://discuss.elastic.co/t/problem-in-percolate-query/4759/4 "2017-07-06T04:01:58Z")

</div>


