[英]ElasticSearch: Poor search results using “OR” operator
I'm currently using a multimatch query in ES with the "OR" operator. 我目前正在ES中使用“或”运算符使用多匹配查询。 The problem I'm running into is that ES doesn't know which term is most important in a search query.
我遇到的问题是ES不知道哪个词在搜索查询中最重要。 When searching a list of businesses for
在搜索企业列表时
natural cat food
we can tell that cat
is significantly more important to match on than natural
, and would expect pet supply stores to come back. 我们可以说,
cat
搭配比natural
搭配重要得多,并且可以期望宠物用品商店会回来。
But because natural
is just as rare a word as cat
, the Salon with "natural hair care products" is being returned with a similar score to the Pet Supply store that only has "cat" in their description. 但是由于
natural
与cat
一样罕见,因此,带有“天然护发产品”的沙龙以与在其描述中仅带有“猫”的宠物用品商店相似的评分返回。
If I switched to the "AND" operator, then nothing would be returned at all, though. 如果我切换到“ AND”运算符,那么什么也不会返回。 So how do I get ES to figure out that
cat
is a more relevant word to match on than natural
in this case? 那么,在这种情况下,如何让ES找出
cat
是比natural
词更相关的单词呢?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.