Hello,
in Elasticsearch documentation there are references on how to disable TF-IDF. However, I need to just disable IDF (while keeping TF, queryNorm, ...)
Which would be the best way of archiving that?
Thank you.
Hello,
in Elasticsearch documentation there are references on how to disable TF-IDF. However, I need to just disable IDF (while keeping TF, queryNorm, ...)
Which would be the best way of archiving that?
Thank you.
https://www.elastic.co/guide/en/elasticsearch/reference/2.4/query-dsl-function-score-query.html might be an option.
Thanks for your answer. I indeed explored this option before. However, I do not see a clear way of just "disabling" IDF.
Any idea?
Hi,
AFAIK there is no simple option that just turns of IDF, since customizing the similarity calculation is very much an expert thing. If you don't want to go the function score query route, I think the only option left is to write your own lucene similarity and use it as a plug in. I found a blog and a project describing this here, but didn't try this myself, but maybe this is a starting point for exploration: http://stefansavev.com/blog/custom-similarity-for-elasticsearch/
Thanks for your reply.
I'll go for the custom similarity.
© 2020. All Rights Reserved - Elasticsearch
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.