ES/Kibana 中的 _score 是什么?

Blu*_*oon 6 elasticsearch kibana

我在 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
            }
          ]
        }
      }
    ]
  }
}
Run Code Online (Sandbox Code Playgroud)

Tim*_*Tim 9

_score在Elasticsearch是确定匹配的相关程度查询的方式。Elasticsearch 使用的默认评分函数实际上是 Lucene 内置的默认值,这是 Elasticsearch 在后台运行的。这是一篇很好地描述得分的文章。

https://www.compose.com/articles/how-scoring-works-in-elasticsearch/

Elasticsearch 在幕后运行 Lucene,因此默认情况下它使用 Lucene 的实用评分函数。这是一个基于词频 (tf) 和逆文档频率 (idf) 的相似性模型,它还使用向量空间模型 (vsm) 进行多词查询。