"_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
新手,望指教
1 个回复
Charele - Cisco4321
赞同来自:
用http://ip:9200/索引名/_mappings看下呢