Percolator does not support min_score?


(Miyuki Endo) #1

Hi! I'm running the following percolator to test out one of the use cases:

Elasticsearch version 1.1.1

---PUT Percolator
curl -XPUT 'localhost:9200/shop/.percolator/p-1' -d @percolator1.json

---percolator1.json
{
"min_score":0.8,
"query":{
"filtered":{
"query":{
"match":{
"casts":"Johnny Anne"
}
},
"filter":{
"range":{
"year":{
"gte":2005
}
}
}
}
}
}

---PUT Document
curl -XPUT 'localhost:9200/shop/dvd/0' -d '{
"title":"Alice in Wonderland",
"year":2010,
"director":"Tim Burton",
"writer":["Linda Woolverton","Lewis Carroll"],
"casts":["Johnny Depp","Mia Wasikowska","Anne Hathaway"],
"time":109,
"available":true,
"tags":["Family","Fantasy","Adventure"]
}'

---Get Document (standard query : same ".percolator/p-1")
curl -XGET 'localhost:9200/shop_ja/dvd/_search?pretty' -d '
{
"min_score":0.8,
"query":{
"filtered":{
"query":{
"match":{
"casts":"Johnny Anne"
}
},
"filter":{
"range":{
"year":{
"gte":2005
}
}
}
}
}
}'
=> No hit

  • When "min_score" is 0.7, it hits as expected.

--- Get _percolate
curl -XGET 'localhost:9200/shop_ja/dvd/0/_percolate'
=> ..."total":1,"matches":[{"_index":"shop","_id":"p-1"}]

It seems that there is no effect of min_score.
percolator does not support min_score?

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2325e125-77b5-43b4-bfc8-ec2ca71704cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Jun Ohtani) #2

Hi,

I’m not sure how to implement the percolator,
but I think that min_score does not work properly.
Because the percolator is processing one document at a time,
it is different from the usual score.

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html#_important_notes

Why do you want to use the min_score?


Jun Ohtani
johtani@gmail.com
twitter : http://twitter.com/johtani

2014/06/04 12:20、Miyuki Endo miyuki@knowledge-works.co.jp のメール:

Hi! I'm running the following percolator to test out one of the use cases:

Elasticsearch version 1.1.1

---PUT Percolator
curl -XPUT 'localhost:9200/shop/.percolator/p-1' -d @percolator1.json

---percolator1.json
{
"min_score":0.8,
"query":{
"filtered":{
"query":{
"match":{
"casts":"Johnny Anne"
}
},
"filter":{
"range":{
"year":{
"gte":2005
}
}
}
}
}
}

---PUT Document
curl -XPUT 'localhost:9200/shop/dvd/0' -d '{
"title":"Alice in Wonderland",
"year":2010,
"director":"Tim Burton",
"writer":["Linda Woolverton","Lewis Carroll"],
"casts":["Johnny Depp","Mia Wasikowska","Anne Hathaway"],
"time":109,
"available":true,
"tags":["Family","Fantasy","Adventure"]
}'

---Get Document (standard query : same ".percolator/p-1")
curl -XGET 'localhost:9200/shop_ja/dvd/_search?pretty' -d '
{
"min_score":0.8,
"query":{
"filtered":{
"query":{
"match":{
"casts":"Johnny Anne"
}
},
"filter":{
"range":{
"year":{
"gte":2005
}
}
}
}
}
}'
=> No hit

  • When "min_score" is 0.7, it hits as expected.

--- Get _percolate
curl -XGET 'localhost:9200/shop_ja/dvd/0/_percolate'
=> ..."total":1,"matches":[{"_index":"shop","_id":"p-1"}]

It seems that there is no effect of min_score.
percolator does not support min_score?

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2325e125-77b5-43b4-bfc8-ec2ca71704cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Miyuki Endo) #3

Hi,

I thought that restriction of a percolator query type are only has_child,
top_child, has_parent, nested.

I would like to notice that document if the score exceeds the specified,
using percolator.
However, I understand that min_score does not work.
Thank you very much.

2014年6月4日水曜日 14時56分29秒 UTC+9 Jun Ohtani:

Hi,

I’m not sure how to implement the percolator,
but I think that min_score does not work properly.
Because the percolator is processing one document at a time,
it is different from the usual score.

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html#_important_notes

Why do you want to use the min_score?


Jun Ohtani
joh...@gmail.com <javascript:>
twitter : http://twitter.com/johtani

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/272bfed2-03d1-4638-a830-80ee7e15ea22%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #4