1
我想一个文本输入字段进行排序,而我fielddate设置为true,但它给了我总是以相同的顺序弹性搜索:排序文本不起作用inspite fielddate设置为true
这是我的映射:
"movieTitle": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
},
"analyzer": "french",
"fielddata": true
}
这是我的要求
POST /0802v6/movie/_search
{
"from": 0,
"size": 10,
"min_score": 1,
"sort": [
{
"movieTitle": {
"order": "asc" //or desc
}
}
],
"_source": "movieTitle",
"query": {...}
}
不幸的是我一直wathever我设置ASC或DESC相同的结果。 我能看到的那种属性不包含正确的字
"hits": [ {
"_index": "0802v6",
"_type": "proj",
"_id": "AVojCSjg8N13TOVDp6r2",
"_score": null,
"_source": {
"movieTitle": "12 Years a Slave"
},
"sort": [
"12"
]
},
{
"_index": "0802v6",
"_type": "proj",
"_id": "AVojCSg58N13TOVDp6pV",
"_score": null,
"_source": {
"movieTitle": "black wing has my angel"
},
"sort": [
"angel"
]
},
{
"_index": "0802v6",
"_type": "proj",
"_id": "AVojCSjg8N13TOVDp6qT",
"_score": null,
"_source": {
"movieTitle": "TO DO LIST (THE)"
},
"sort": [
"do"
]
},
{
"_index": "0802v6",
"_type": "proj",
"_id": "AVojCSo28N13TOVDp68w",
"_score": null,
"_source": {
"movieTitle": "Third Person"
},
"sort": [
"person"
]
}
]
你知道会发生什么,以及如何解决它吗?