私は範囲ファセットを使用して検索をやってる:elasticsearch rangeファセットのcountとtotal_countの違いは何ですか?
{
"query": {
"match_all": {}
},
"facets": {
"prices": {
"range": {
"field": "product_price",
"ranges": [
{"from": 0, "to": 200},
{"from": 200, "to": 400},
{"from": 400, "to": 600},
{"from": 600, "to": 800},
{"from": 800}
]
}
}
}
}
をそして予想通り、私は、応答としての範囲を得た:すべての回答count
とtotal_count
で
[
{
"from": 0.0,
"to": 200.0,
"count": 0,
"total_count": 0,
"total": 0.0,
"mean": 0.0
},
{
"from": 200.0,
"to": 400.0,
"count": 1,
"min": 399.0,
"max": 399.0,
"total_count": 1,
"total": 399.0,
"mean": 399.0
},
{
"from": 400.0,
"to": 600.0,
"count": 5,
"min": 499.0,
"max": 599.0,
"total_count": 5,
"total": 2886.0,
"mean": 577.2
},
{
"from": 600.0,
"to": 800.0,
"count": 3,
"min": 690.0,
"max": 790.0,
"total_count": 3,
"total": 2179.0,
"mean": 726.3333333333334
},
{
"from": 800.0,
"count": 2,
"min": 899.0,
"max": 990.0,
"total_count": 2,
"total": 1889.0,
"mean": 944.5
}
]
は同じです。 誰に違いがあるのか分かりませんか?どちらを使うべきですか?
これはドキュメントのどこかにありますか?はいの場合はリンクがありますか?ありがとう – jackdbernier
実際にどこでも読んだことはありません。自分自身で試してみました:)私は複数の値について「ElasticSearchサーバーブック」で何かを読んでいますが、それは私にとにかくはっきりしませんでした。 – javanna