What is the meaning of field^4 from scoring perspective?


(dark_shadow) #1

Hi,

I was going through the documentation of ES where they have mentioned that
we can use boost for a certain field.

Boosting

Use the boost operator ^ to make one term more relevant than another. For
instance, if we want to find all documents about foxes, but we are
especially interested in quick foxes:

quick^2 fox

The default boost value is 1, but can be any positive floating point
number. Boosts between 0 and 1 reduce relevance.

Boosts can also be applied to phrases or to groups:

"john smith"^2 (foo bar)^4

My doubt is what is the meaning of ^2 means is it like multiplying by a factor of 2 or multiplying the whole document score by 2 ?

Thanks

--
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/200b5523-8d4c-4b53-8333-b3a452954d32%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Alexander Reelsen) #2

Hey,

if you are interested in the background of this, a very useful link might
be the explanation of tf-idf scoring in lucene at

https://lucene.apache.org/core/4_0_0/core/org/apache/lucene/search/similarities/TFIDFSimilarity.html

The boost a term query boost and thus only applies to boost that term and
not the whole document. You can take a look at the boost_factor at the
custom function score query, if this is not the desired behaviour

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html#query-dsl-function-score-query

--Alex

On Mon, Feb 3, 2014 at 8:04 PM, coder mukulnitkkr@gmail.com wrote:

Hi,

I was going through the documentation of ES where they have mentioned that
we can use boost for a certain field.

Boosting

Use the boost operator ^ to make one term more relevant than another.
For instance, if we want to find all documents about foxes, but we are
especially interested in quick foxes:

quick^2 fox

The default boost value is 1, but can be any positive floating point
number. Boosts between 0 and 1 reduce relevance.

Boosts can also be applied to phrases or to groups:

"john smith"^2 (foo bar)^4

My doubt is what is the meaning of ^2 means is it like multiplying by a factor of 2 or multiplying the whole document score by 2 ?

Thanks

--
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/200b5523-8d4c-4b53-8333-b3a452954d32%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
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/CAGCwEM_CnpzwAQsTMxrzF3XqdCo1uF699%2BWLwQ69A6%3D1YQ7rCQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #3