curl -XPUT http://127.0.0.1:9800/project_v1 -d '{ "settings": { "index": { "analysis": { "analyzer": { "douhao": { "type": "pattern", "pattern": "," }, "my_ngram": { "filter": [ "lowercase" ], "tokenizer": "my_ngram" } }, "tokenizer": { "my_ngram": { "token_chars": [ "letter", "digit" ], "min_gram": "2", "type": "nGram", "max_gram": "2" } } }, "number_of_shards": "8", "number_of_replicas": "0" } }, "mappings": { "projectset": { "transform": { "lang": "groovy", "script": "ctx._source[\"id\"] = ctx._source[\"_id\"]" }, "_id": { "path": "_id" }, "_all": { "enabled": false }, "properties": { "firsttime": { "type": "long" }, "city": { "index": "not_analyzed", "type": "string" }, "projectcode": { "index": "not_analyzed", "type": "string" }, "jgtime": { "type": "long" }, "projectscope": { "index": "not_analyzed", "type": "string" }, "multipackage": { "type": "integer" }, "subscopeclass": { "index": "not_analyzed", "type": "string" }, "sortprice": { "type": "double" }, "s_projectname": { "index": "not_analyzed", "type": "string" }, "id": { "index": "not_analyzed", "type": "string" }, "budget": { "type": "double" }, "s_subscopeclass": { "type": "string" }, "area": { "index": "not_analyzed", "type": "string" }, "mpc": { "type": "string" }, "bidamount": { "type": "double" }, "createtime": { "type": "long" }, "projectname": { "index": "not_analyzed", "type": "string", "fields": { "pname": { "analyzer": "my_ngram", "type": "string" } } }, "buyertel": { "type": "string" }, "agency": { "index": "not_analyzed", "type": "string" }, "bidstatus": { "index": "not_analyzed", "type": "string" }, "s_winner": { "analyzer": "douhao", "type": "string" }, "winnerorder": { "properties": { "sortstr": { "type": "string" }, "entname": { "type": "string" }, "price": { "type": "long" }, "sort": { "type": "long" }, "type": { "type": "long" } } }, "mpn": { "type": "string" }, "pici": { "type": "long" }, "list": { "properties": { "city": { "type": "string" }, "district": { "type": "string" }, "site": { "type": "string" }, "spidercode": { "type": "string" }, "multipackage": { "type": "long" }, "projectcode": { "type": "string" }, "contractcode": { "type": "string" }, "projectscope": { "type": "string" }, "title": { "type": "string" }, "comeintime": { "type": "long" }, "toptype": { "type": "string" }, "subtype": { "type": "string" }, "infoformat": { "type": "long" }, "href": { "type": "string" }, "pjVal": { "type": "long" }, "budget": { "type": "long" }, "area": { "type": "string" }, "bidamount": { "type": "long" }, "projectname": { "type": "string" }, "buyertel": { "type": "string" }, "infoid": { "type": "string" }, "agency": { "type": "string" }, "compareStr": { "type": "string" }, "bidstatus": { "type": "string" }, "resVal": { "type": "long" }, "buyer": { "type": "string" }, "buyerclass": { "type": "string" }, "winner": { "type": "string" }, "s_winner": { "type": "string" }, "bidopentime": { "type": "string" }, "publishtime": { "type": "long" }, "topscopeclass": { "type": "string" }, "subscopeclass": { "type": "string" }, "buyerperson": { "type": "string" } } }, "buyer": { "index": "not_analyzed", "type": "string" }, "bidtype": { "index": "not_analyzed", "type": "string" }, "buyerclass": { "type": "string" }, "sourceinfoid": { "index": "not_analyzed", "type": "string" }, "sourceinfourl": { "index": "not_analyzed", "type": "string" }, "lasttime": { "type": "long" }, "winner": { "index": "not_analyzed", "type": "string" }, "bidopentime": { "type": "long" }, "district": { "type": "string" }, "extractpos": { "index": "not_analyzed", "type": "string" }, "ids": { "type": "string" }, "topscopeclass": { "index": "not_analyzed", "type": "string" }, "buyerperson": { "type": "string" }, "zbtime": { "type": "long" }, "contractcode": { "index": "not_analyzed", "type": "string" }, "exception": { "type": "integer" }, "results1": { "properties": { "code": { "type": "string" }, "level": { "type": "string" }, "column": { "type": "string" }, "pici": { "type": "long" }, "describtion": { "type": "string" } } }, "flag_buyerclass": { "type": "long" }, "flag_budget": { "type": "long" }, "budgettag": { "type": "integer" }, "project_rate": { "type": "double" }, "projecthref": { "type": "string" }, "flag": { "type": "string" }, "flag_agency": { "type": "long" }, "flag_firsttime": { "type": "long" }, "b": { "type": "string" }, "listtag": { "type": "long" }, "bidamounttag": { "type": "integer" }, "package1": { "properties": { "bidamount": { "type": "long" }, "winner": { "index": "not_analyzed", "type": "string" } } }, "flag_winner": { "type": "long" }, "flag_buyer": { "type": "long" }, "flag_bidamount": { "type": "long" }, "clean_time": { "type": "long" } } } } }'