Problem in percolate query

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

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

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.ukwrote:

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