[英]ElasticSearch. Priority does not work
I have a wrong results when I use cross_fields search When i send this query 当我使用cross_fields搜索时,我的查询结果有误
{'from': 0,
'sort': ['_score'],
'size': 400,
'query': {
'bool':
{'must':
{'multi_match':
{'type': 'cross_fields',
'fields': ['nickname^1', 'pedigree_name^0.4', 'breed^0.2', 'city^0.1', 'country^0.05'],
'operator': 'and',
'query': 'Akita'}
}
}
}
}
But why? 但为什么? Pedigree_name priority are higher then breed priority 家谱名称优先级高于品种优先级
I believe the reason is that your query type is 'cross_fields'. 我相信原因是您的查询类型为“ cross_fields”。 It "analyzes the query string into individual terms, then looks for each term in any of the fields, as though they were one big field." 它“将查询字符串分析为单个术语,然后在任何字段中查找每个术语,就好像它们是一个大字段一样。” Further rom here : 进一步的ROM 在这里 :
Note that cross_fields is usually only useful on short string fields that all have a boost of 1. Otherwise boosts, term freqs and length normalization contribute to the score in such a way that the blending of term statistics is not meaningful anymore. 请注意,cross_fields通常仅适用于所有均具有1提升值的短字符串字段。否则,提升值,术语频率和长度归一化会以一种使得术语统计信息不再有意义的方式来贡献分数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.