What is default similarity in Elasticsearch 5

(Svarup) #1

I have been trouble to find what is the default similarity in Elasticsearch 5
is BM25 or Classic Lucene IF/IDF?

(Colin Goodheart-Smithe) #2

The default in 5.0 is BM25. See https://www.elastic.co/guide/en/elasticsearch/reference/5.0/similarity.html for more details

(Svarup) #3

so if I want to use TF/IDF then am I correct with below code?

'similarity' => [
'default' => [
'type' => 'classic',

is classic point out to TF/IDF?

(Colin Goodheart-Smithe) #4

Yes classic indicates that you want to use TF/IDF. information on setting the default similarity can be found here: https://www.elastic.co/guide/en/elasticsearch/reference/5.0/index-modules-similarity.html#default-base

(system) #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.