私は検索を行い、結果をソートしようとしています。しかし、私はなぜエラーが発生しているのか分からない。ElasticSearch - ソートが機能しない
EDIT - 完全なマッピングを提供します。
POST /index/_search
{
"sort": [
{ "myfield.sort" : {"order" : "asc"}}
]
}
私は次のエラーを取得するには::
{
"error": {
"root_cause": [
{
"type": "query_shard_exception",
"reason": "No mapping found for [myfield.sort] in order to sort on",
"index_uuid": "VxyKnppiRJCrrnXfaGAEfA",
"index": "index"
}
]
"status": 400
}
私は上のドキュメントを以下のよ、私はこのように、並べ替えと検索を行っ
"myindex": {
"mappings": {
"mytype": {
"dynamic_templates": [
{
// Dynamic templates here!
}
],
"properties": {
"fieldid": {
"type": "keyword",
"store": true
},
"fields": {
"properties": {
"myfield": {
"type": "text",
"fields": {
"sort": {
"type": "keyword",
"ignore_above": 256
}
},
"analyzer": "myanalyzer"
}
}
},
"isDirty": {
"type": "boolean"
}
}
}
}
}
}
elasticsearch。 DOCUMENTATION
また、私は、このリンクをチェック: DOCUMENTATION
は、誰かが私を助けて提供することができますか?
あなたは何を得るのですができますか? – Val
私はマッピングを取得します。しかし問題はマッピングではなく、検索であった。最後のコメントでソリューションを確認できます。とにかくありがとう:) – NatsuDragonEye