[Elasticsearch - The Definitive Guide] Relevance is Broken!

Elastic/TheDefinitiveGuide 2015. 12. 10. 12:22

예전에 어느 분이 elasticsearch에서 score 관련 문의를 주셨었는데요.

IDF 값에 대한 global value 를 사용하는지 였습니다.

Elasticsearch에서는 default 설정이 사용하지 않는다 입니다.


서비스와 문서 특징에 따라 다를수는 있지만 저 역시 반드시 global idf 값을 써야 하나 하는 생각이 듭니다.

일단 각설 하고, The Definitive Guide 에 올라온 내용 기록 합니다.


원문링크)

https://www.elastic.co/guide/en/elasticsearch/guide/current/relevance-is-broken.html


원문 Snippet)

However, for performance reasons, Elasticsearch doesn’t calculate the IDF across all documents in the index. Instead, each shard calculates a local IDF for the documents contained in that shard.

...중략...

Don’t use dfs_query_then_fetch in production. It really isn’t required. Just having enough data will ensure that your term frequencies are well distributed. There is no reason to add this extra DFS step to every query that you run.


: