PostMan为es创建带有分词器的索引

1、首先你要安装了es以及为es安装了相应的分词器(例如ik等)

es安装:https://blog.youkuaiyun.com/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.youkuaiyun.com/qq_32401031/article/details/86529378

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值