0

I tried this simple query:

{
"query":{
"range":{"ncopies":{gte:2, lte:5}}
}
}

and each document returned had a score of 1.

Then I tried:

{
"query":{
"term":{"ncopies":2}
}
}

and each document returned has a score of 1.52

Is there a difference in how score is calculated for "term" and "range"?

sudeepdino008
  • 3,194
  • 5
  • 39
  • 73
  • Possible duplicate of [What's the denominator for ElasticSearch scores?](http://stackoverflow.com/questions/21346164/whats-the-denominator-for-elasticsearch-scores) "The score is kinda meaningless outside a particular query. It's only purpose is to compare one doc against another in the context of a single query" – Thilo Nov 19 '16 at 06:47

1 Answers1

0

Range query matches documents with fields that have terms within a certain range.If ncopies is 3,it matches ncopies>=2 &ncopies<=5,it does not analyze,just compare the value of a field.The value of Doc1's ncopies is 4,Doc2's ncopies is 3,both match,they have the same score of 1.

Term query will use analyzer to score.

Yao Pan
  • 524
  • 9
  • 26