You can enable explain for your query and see how elasticsearch calculates
score:
{
"explain": true,
"query": {
"match": {
"title": "xbox"
}
}
}
On Tuesday, March 10, 2015 at 3:15:50 PM UTC+7, Xudong You wrote:
>
> I have two documents as follows:
>
> 1.
> {
> "title":"xbox"
> }
>
> 2.
> {
> "title":"xbox xbox xbox"
> }
>
> Then I search the documents with following query:
> {
> "query":{"match":{"title":"xbox"}}
> }
>
> ES returns result as follows:
>
> {"took":133,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":2,"max_score":0.30685282,
> "hits":[
>
> {"_index":"storetest1","_type":"type","_id":"1","_score":0.30685282,"_source":{"title":"xbox","keywords":["xbox"]}},
>
> {"_index":"storetest1","_type":"type","_id":"2","_score":0.26574233,"_source":{"title":"xbox
>
> xbox xbox","keywords":["xbox"]}}]}}
>
>
> My question is, why #1 got higher score than #2? I thought #2 is higher
> than #1, since more xbox appear in title of #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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/686a7c57-763a-4824-9fc3-36b0ff6c134b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.