我正在使用Elasticsearch从文章数据库中获取相关博客文章。我希望包含特定单词的搜索结果比没有搜索结果的搜索结果得分更高。
我尝试添加停用词,并在其他字段中添加了更多内容,但结果与预期不符。我正在使用elasticsearch的Kibana界面的开发人员模式
“”“
GET blog-desc/_search
{
"query": {
"more_like_this" : {
"fields" : ["Meta description","Title^5",
"Short title^0.5"],
"like" : "Harry had a silver wand he likes to play with! Among his friends he has the most expensive one. The only difference between his wand and his sister's is that in the color",
"min_term_freq" : 1,
"max_query_terms" : 12,
"minimum_should_match": "30%",
"stop_words": ["difference", "play", "among"]
, "boost_terms": 1
}
}
}
“”“ 在上面的示例代码中,我希望搜索结果中包含“ silver”作为单词的单词比没有该单词的其他文章获得更高的得分。