0
私は以下のようにElasticsearch 5.5に保存されたサンプルデータを持っています。私は、郵便配達員を使用して、match_all、gteなどに基づいてインデックスを作成し、検索することができます。弾性検索:評価に基づく並べ替え
{
"name":"Apple",
"address": {
"city":"Cupertino",
"state":"CA",
"country":"USA"
},
"rating":"4.9"
}
私は評価に基づいて、すべてのエンティティをソートする必要があるので、私は
{
"query":{
"match_all":{}
},
"sort" : [
{
"rating" : {
"order" : "desc"
}
}
]
}
の下に使用しています。しかし、私は郵便配達
"type": "illegal_argument_exception",
"reason": "Fielddata is disabled on text fields by default. Set fielddata=true on [rating] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."
にエラー下の任意の提案を参照してください?