Search code examples
searchelasticsearchrelevance

Filtering Results from ElasticSearch by Relevancy


I am attempting to figure out the best way to solve this problem. Lets say I have a user who is typing in a short sentence, and I want to match this sentence (a query essentially) to a small set of documents that are assigned to the user. The issue I am facing, is that unlike a Google Search, where a list of highly relevant to lowly relevant documents make sense, I want to choose a subset of these documents automatically without user intervention. Is there any way to filter out 'low relevance' documents?

In researching this, the answer seems to be no, since the _score from elasticsearch is not on a consistent scale from query to query (and the documentation states min_score is stupid to use). Is there a way to filter out results that do not have a _score of at least 90% of the max _score for that given query (I'm sure this can be done in a language processing the results, was curious if ES provides this through some built in functionality)? What about filtering documents that did not match more than one term (so documents matching in only one term of the query are dropped out)?

Thanks for any insight!


Solution

  • What about the Minimum Should Match option?