BM25 similarities in Elasticsearch
I want to change the default Elasticsearch affinity to BM25.
According to
http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.4/index-modules-similarity.html
I need to add the following line to elasticsearch.yml file
index.similarity.default.type: BM25
However, BM25 has two input parameters k1
and b
which I would like to set as well.
Does anyone know how to set these parameters?
source to share
I found a really good page that explains the meaning of the parameters. It's located here: https://www.elastic.co/guide/en/elasticsearch/guide/current/pluggable-similarites.html
Here is a snippet from that page:
k1: This parameter determines how quickly the increase in the period frequency leads to saturation in frequency. The default is 1.2. Lower values ββresult in faster saturation and higher values ββat slower saturation.
b: This parameter determines how much field length normalization should be performed. A value of 0.0 completely disables normalization, and a value of 1.0 normalizes completely. The default is 0.75.
source to share