1、首先你要安装了es以及为es安装了相应的分词器(例如ik等)
es安装:https://blog.csdn.net/qq_32401031/article/details/86529378
分词器(包含:ik,bihuaanalysis,myanalyzer,pinyinanalyzer等)下载链接:
https://pan.baidu.com/s/1rYa-EdDjF9BbPCv9Y48pPA 提取码:rjfz
2、利用postMan创建带有分词器的索引:
例:
"mappings": {
"brandname": {
"properties": {
"applyDate": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"applyer": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"brandnamecommon": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"cityCode": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"countryCode": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"csggqh": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"csggrq": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"dlrmc": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"gjfl": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"hasXuzhan": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"id": {
"type": "string",
"index": "not_analyzed"
},
"idCardNo": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"lastSbkcItem": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"nameArray": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"namebihua": {
"type": "string",
"store": true,
"analyzer": "bihuaanalysis"
},
"namelike": {
"type": "string",
"store": true,
"analyzer": "myanalysis"
},
"namelikeCn": {
"type": "string",
"store": true,
"analyzer": "myanalysis"
},
"namelikeCnLength": {
"type": "integer",
"store": true
},
"namelikeEn": {
"type": "string",
"store": true,
"analyzer": "myanalysis"
},
"namelikeEnLength": {
"type": "integer",
"store": true
},
"namelikeNo": {
"type": "string",
"store": true,
"analyzer": "myanalysis"
},
"namelikeNoLength": {
"type": "integer",
"store": true
},
"namelikelength": {
"type": "integer",
"store": true
},
"needAttion": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"newProcessDate": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"newprocess": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"pinyin": {
"type": "string",
"store": true,
"analyzer": "emptyanalysis"
},
"pinyinLength": {
"type": "integer",
"store": true
},
"progress": {
"type": "integer",
"store": true
},
"qzCode": {
"type": "string",
"store": true,
"analyzer": "emptyanalysis"
},
"shengfenCode": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"sqrmcYw": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"status": {
"type": "integer",
"store": true
},
"tableid": {
"type": "integer",
"store": true
},
"tags": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"tagsArray": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"usercard": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"zcggqh": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"zch": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"zchNo": {
"type": "integer",
"store": true
},
"zyqqxEnd": {
"type": "string",
"index": "not_analyzed",
"store": true
}
}
}
}
3、利用esm导入数据:https://blog.csdn.net/qq_32401031/article/details/86529378