我有许多对象在ES中被索引。每个对象的两个属性是"type"answers"title"。有没有什么方法可以提高结果,这样,如果结果集中的某个类型占多数,那么标题的权重就会比"描述"等其他属性大得多?
编辑:我已经在提升某些属性了。但鉴于结果集的某些特性(大多数类型都相似),我希望进一步提升另一个领域。
您可以在查询中添加boosting:
例如:
"term": {
"terms": {
"value": "stranger then fiction",
"boost": 1.8
}
点击此处阅读更多信息:http://www.elasticsearch.org/guide/reference/mapping/boost-field/