How can I change Elastic Search to use BM25 sinstead of the default tf-idf
similarity for all fields of my index? I the docs, I could find only how to
set the the similarity per field using the put mapping API. I would like
that Elastic Search use BM25 if I don't explicitly define a similarity. Is
that possible?
Just found that adding the following line in config/elasticsearch.yml works
(at least when using "explain: true", the parameters of BM25 similartity
are shown in the score explanation).
index.similarity.default.type: BM25
Maybe this should be added in the documentation of the similarity module:
How can I change Elastic Search to use BM25 sinstead of the default tf-idf
similarity for all fields of my index? I the docs, I could find only how to
set the the similarity per field using the put mapping API. I would like
that Elastic Search use BM25 if I don't explicitly define a similarity. Is
that possible?
Just found that adding the following line in config/elasticsearch.yml
works (at least when using "explain: true", the parameters of BM25
similartity are shown in the score explanation).
How can I change Elastic Search to use BM25 sinstead of the default
tf-idf similarity for all fields of my index? I the docs, I could find only
how to set the the similarity per field using the put mapping API. I would
like that Elastic Search use BM25 if I don't explicitly define a
similarity. Is that possible?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.