配置 mapping 使能 fielddata 。
Enabling fielddata on text fieldsedit
You can enable fielddata on an existing text field using the PUT mapping API as follows:
PUT my_index/_mapping/_doc
{
"properties": {
"my_field": {
"type": "text",
"fielddata": true
}
}
}
参考
https://www.elastic.co/guide/en/elasticsearch/reference/6.3/fielddata.html
网友评论