我有一个要求,当我在Elasticsearch中搜索时,我必须产生。根据它,如果我们正在搜索字符串"My missing property file“,如果在任何字段中找到完整的短语,文档将得到提升,如果从4个单词中找到3个单词,则文档将被赋予更低的boost.So,基本上我们需要在该字段中给予关键字顺序匹配更多的相关性。所以按照顺序
"My missing property file" - most higher boost
"missing property file" - second higher boost
"missing property" - third higher boost.现在,当我们有这样的条件时,我们有包含"missing property file“和"My missing property”的字段,在这种情况下,每个关键字的idf应该决定相关性。
我们如何在Elasticsearch中实现这一点?任何帮助或建议都是很棒的
发布于 2017-03-24 20:34:12
字段上的正常匹配查询应该按您所需的顺序对命中进行排名。
https://stackoverflow.com/questions/42999393
复制相似问题