curl -H 'Content-Type: application/json' -u jianyuGr:we3g8glKfe# -XPUT http://127.0.0.1:19805/forecast_v2 -d '{ "settings": { "analysis": { "analyzer": { "douhao": { "type": "pattern", "pattern": "," }, "my_ngram_title": { "filter": [ "lowercase" ], "tokenizer": "my_ngram_title" }, "my_ngram": { "filter": [ "lowercase" ], "tokenizer": "my_ngram" } }, "tokenizer": { "my_ngram_title": { "token_chars": [ "letter", "digit", "punctuation", "symbol" ], "min_gram": "1", "type": "nGram", "max_gram": "1" }, "my_ngram": { "token_chars": [ "letter", "digit" ], "min_gram": "2", "type": "nGram", "max_gram": "2" } } }, "index": { "number_of_shards": "9", "number_of_replicas": "0" } }, "mappings": { "dynamic":false, "properties": { "area": { "type": "keyword" }, "city": { "type": "keyword" }, "district": { "type": "keyword" }, "nature": { "type": "keyword" }, "buyer": { "type": "keyword" }, "buyerclass": { "type": "keyword" }, "infoid": { "type": "keyword" }, "title": { "analyzer": "my_ngram_title", "type": "text" }, "projectname": { "type": "keyword", "fields": { "pname": { "type": "keyword" } } }, "projectcode": { "type": "keyword" }, "spidercode": { "type": "keyword" }, "budget": { "type": "double" }, "bidamount": { "type": "double" }, "sortprice": { "type": "double" }, "stage": { "type": "keyword" }, "main_project": { "type": "keyword" }, "top_category": { "type": "keyword" }, "sub_category": { "type": "keyword" }, "approvestatus": { "type": "keyword" }, "href": { "type": "keyword" }, "jyhref": { "type": "keyword" }, "publishtime": { "type": "long" }, "yucetime": { "type": "long" }, "yucestarttime": { "type": "long" }, "yuceendtime": { "type": "long" }, "results": { "properties": { "purchasing": { "analyzer": "douhao", "type": "text", "fields": { "mypurchasing": { "analyzer": "my_ngram_title", "type": "text" } } }, "p_projects": { "properties": { "p_purchasing": { "type": "keyword" }, "p_id": { "type": "keyword" }, "p_orther": { "type": "keyword" }, "p_phone": { "type": "keyword" }, "p_person": { "type": "keyword" } } } } } } } }'