curl -XPUT http://127.0.0.1:9800/winner_enterprise -d '{ "settings": { "index": { "analysis": { "analyzer": { "my_ngram": { "tokenizer": "my_ngram" } }, "tokenizer": { "my_ngram": { "min_gram": "2", "type": "nGram", "max_gram": "2" } } }, "number_of_shards": "6", "number_of_replicas": "0" } }, "mappings": { "winner_enterprise": { "transform": { "lang": "groovy", "script": "ctx._source[\"id\"] = ctx._source[\"_id\"]" }, "_id": { "path": "_id" }, "_all": { "enabled": false }, "properties": { "company_name":{ "analyzer": "my_ngram", "type": "string" }, "history_name": { "index": "not_analyzed", "type": "string" }, "credit_no": { "index": "not_analyzed", "type": "string" }, "area_code": { "index": "not_analyzed", "type": "string" }, "province": { "index": "not_analyzed", "type": "string" }, "city": { "index": "not_analyzed", "type": "string" }, "district": { "index": "not_analyzed", "type": "string" }, "company_type": { "index": "not_analyzed", "type": "string" }, "legal_person": { "index": "not_analyzed", "type": "string" }, "establish_date": { "type": "long" }, "capital": { "type": "float" }, "company_address": { "index": "not_analyzed", "type": "string" }, "business_scope": { "index": "not_analyzed", "type": "string" }, "wechat_accounts": { "index": "not_analyzed", "type": "string" }, "website": { "index": "not_analyzed", "type": "string" }, "partners": { "index": "not_analyzed", "type": "string" }, "stock_type": { "index": "not_analyzed", "type": "string" }, "stock_name": { "index": "not_analyzed", "type": "string" }, "stock_capital": { "index": "not_analyzed", "type": "string" }, "stock_realcapital": { "index": "not_analyzed", "type": "string" }, "industry": { "index": "not_analyzed", "type": "string" }, "contact": { "index": "not_analyzed", "type": "string" }, "contact_person": { "index": "not_analyzed", "type": "string" }, "contact_type": { "index": "not_analyzed", "type": "string" }, "phone": { "index": "not_analyzed", "type": "string" }, "topscopeclass": { "index": "not_analyzed", "type": "string" }, "updatetime": { "type": "long" } } } } }'