How to add ambiguity to a multi_match request? Therefore, if someone searches for “basketball,” he will still find “baseball” articles. Currently my query looks like this:
POST /newspaper/articles/_search { "query": { "function_score": { "query": { "multi_match": { "query": "baseball", "type": "phrase", "fields": [ "subject^3", "section^2.5", "article^2", "tags^1.5", "notes^1" ] } } } } }
One option that I have been considering is to do something like this, I just don't know if this is the best option. It is important to maintain sorting based on the score:
"query" : { "query_string" : { "query" : "subject:basball^3 section:basball^2.5 article:basball^2", "fuzzy_prefix_length" : 1 } }
Suggestions?
elasticsearch fuzzy-search
Funtriaco prado
source share