必须要先创建index mapping
PUT ip:9200/test
{
"mappings": {
"properties": {
"cid": {
"type": "long"
},
"companyName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}