ES/Kibana 中的_score 是什么?

What is _score in ES/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
            }
          ]
        }
      }
    ]
  }
}

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

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

Elasticsearch runs Lucene under the hood so by default it uses Lucene's Practical Scoring Function. This is a similarity model based on Term Frequency (tf) and Inverse Document Frequency (idf) that also uses the Vector Space Model (vsm) for multi-term queries.