Hi,
Hopefully a simple question, but one I'm finding hard to clear up from the
documentation.
When you set a boost on a query, for example:
{"query": {
"bool": {
"must": [
{"query_string":{"fuzzy_prefix_length":3,"query":"description:SEARCH_TERM"}}
],
"should": [
{"range": { "item.rating": { "gt": 1000, "boost":100 } }},
{"range": { "item.rating": { "lt": 10, "boost":0.01 } }}
]
}},
"timeout": "15s",
"size": 10,
"from": 0}
How, exactly, are those boost values applied to the score in the results? I
had assumed they were multipliers of some sort, so that 0.01 would reduce
the score while 100 would increase it. However, messing about with various
values would suggest they're actually added somewhere along the line, so
0.01 increases the score a tiny amount, 100 a large amount, and something
like -10 is required to have a negative impact on the score.
Indeed I had decided that they must be added somewhere, until I noted in
the documentation that the default boost was 1. Which again made me wonder
if it was a multiplier. It seems a curious default to use if the boost is
added.
So, in the above query, what are those boost values actually doing to the
scores? And for those records that don't match either range (so have a
rating greater than ten but less than 100) what boost will be applied - the
default of 1, or nothing because it's not specified?
Cheers,
Matt
--
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.
For more options, visit https://groups.google.com/groups/opt_out.