亲,只收二进制

elasticsearch sort error

Elasticsearch | 作者 felixTang | 发布于2020年07月16日 | 阅读数:1017


"_id": "25802",
    "_version": 1,
    "found": true,
    "_source": {
        "pid": "25799",
        "sort": "999",
        "title": "222",
        "content": "<p>2222</p>",
        "editor_type": "1",
        "username": "",
        "update_time": "2020-07-15 14:50:29",
        "articleId": 25802,
        "status": 1,
        "view": 0,
        "create_time": "2020-07-15 14:50:29"
    }
这是文章内容
es版本是5.6.3
 
{
"sort": [
"_score",
{"view":{"order":"desc"}}
],
"query":{
"multi_match":{
"query":"vpn",
"fields":[ "title", "content"]
}
},
"highlight":{
"fields":{
"content":{
"fragment_size":200,
"type": "unified",
"highlight_query": {
"bool": {
"must": {
"match": {
"content": {
"query": "vpn"
}
}
},
"minimum_should_match": 1
}
}
},
"title":{
"fragment_size":200,
"type": "unified",
"highlight_query": {
"bool": {
"must": {
"match": {
"title": {
"query": "vpn"
}
}
},
"minimum_should_match": 1
}
}
}
}
}
}


"root_cause": [
            {
                "type": "illegal_argument_exception",
                "reason": "Fielddata is disabled on text fields by default. Set fielddata=true on [view] 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."
            }
        ],

view的type不是integer类型么,为什么还说是text fields
新手,望指教
 
 
已邀请:

Charele - Cisco4321

赞同来自:

你确定view这个是integer类型?
http://ip:9200/索引名/_mappings看下呢

要回复问题请先登录注册