1 安装elasticsearch-analysis-dynamic-synonym插件
2 定义ES索引结构
name属性使用自定义"同义词分词器"
{
"test_index_001": {
"mappings": {
"properties": {
"id": {
"type": "long"
},
"name": {
"type": "text",
"analyzer": "synonym"
}
}
},
"settings": {
"index": {