I have seen a lot of posts suggesting against the use of min_score functionality. But it's important for my use case to display only high-quality results. Is there a way i can have the _score returned from elasticsearch be customized to a cosine similarity score between 0 and 1? Or get a good estimate of a good match. Currently the same query gets different scores depending on the size of the data, thus making it difficult to set a min_score. What's the best way to limit results?
Maybe not the answer you hoped for, but: A score is just a number how well a document matched the query. If you have only one document that matches your query, but it does it only slighlty, is this considered a bad match and you rather do not want to present this single document to the user? I would personally do that.
My two cents: I think it makes more time to invest time to rewrite your queries to improve precision and recall instead of using min_score to solve this.
Thanks for the response! Yes, I would rather not show the document if it matches only slightly. My query is just a text field, and I'm using 'more like this' to get a document match. It looks something like this -
"must": [{"more_like_this" : {
"fields" : field_list,
"like" : query_data,
"min_term_freq" : 1,
"max_query_terms" : 50,
"min_doc_freq" : 1,
"minimum_should_match" : min_match}}]}}
Are there best practices to write a query for a text field?
Anyone has more recommendations?
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.