我在ES中有此文档,并且正在通过Kibana进行查看。
_score字段代表什么?
{
"took": 2,
"timed_out": false,
"_shards": {
"total": 11,
"successful": 11,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 1,
"max_score": 0.2876821,
"hits": [
{
"_index": "order",
"_type": "ACKNOWLEDGED",
"_id": "9901234567",
"_score": 0.2876821,
"_source": {
"applicationCode": "SAPS00",
"orderId": "9901234567",
"status": "ACKNOWLEDGED",
"orderUpdatedDateTime": "2018-07-08T10:12:21Z",
"totals": {
"orderShippingTaxAmount": 3.5,
"orderSubtotalTaxAmount": 12.55,
"grandTotalTaxAmount": 15
},
"orderLines": [
{
"lineId": "1",
"unitPriceTaxAmount": 5.45,
"totalPriceTaxAmount": 10.67,
"lineShippingTaxAmount": null
},
{
"lineId": "2",
"unitPriceTaxAmount": 2.45,
"totalPriceTaxAmount": 8.67,
"lineShippingTaxAmount": null
}
]
}
}
]
}
}
答案 0 :(得分:1)
Elasticsearch中的_score
是一种确定匹配与查询的相关程度的方法。 Elasticsearch使用的默认评分功能实际上是Lucene内置的默认评分功能,这是Elasticsearch在后台运行的功能。这是一篇描述得分的文章。
https://www.compose.com/articles/how-scoring-works-in-elasticsearch/
Elasticsearch在后台运行Lucene,因此默认情况下它使用 Lucene的实用计分功能。这是基于相似模型 术语频率(tf)和反向文档频率(idf) 使用向量空间模型(vsm)进行多项查询。