boost
boost
参数让一个查询语句比其他语句更重要。例如
GET /_search { "query": { "bool": { "should": [ { "match": { "title": { "query": "二手空调", "boost": 2 } } }, { "match": { "content": "二手电器" } } ] } } }
title 查询语句的重要性是 content 查询的 2 倍,因为它的权重提升值为 2 。
没有设置 boost 的查询语句的值为 1 。