What is default similarity in Elasticsearch 5

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

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

1 Like

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?

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

1 Like

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