2.建立mappingcurl -XPOST http://192.168.2.226:49200/log_idc2/java/_mapping -d'{ "java": { "properties": { "bsid": { "index": "not_analyzed", "type": "string" }, "ln": { "type": "long" }, "iid": { "index": "not_analyzed", "type": "string" }, "lvn": { "type": "long" }, "esid": { "index": "not_analyzed", "type": "string" }, "cl": { "index": "not_analyzed", "type": "string" }, "proj": { "index": "not_analyzed", "type": "string" }, "lv": { "index": "not_analyzed", "type": "string" }, "m": { "index": "not_analyzed", "type": "string" }, "tsn": { "type": "long" }, "txt": { "type": "string", "index" : "analyzed", "analyzer":"standard", "fields" : { "ik" : { "type" : "string", "index" : "analyzed", "analyzer":"ik" } } }, "ex": { "type": "string", "index" : "analyzed", "analyzer":"standard", "fields" : { "ik" : { "type" : "string", "index" : "analyzed", "analyzer":"ik" } } }, "file": { "index": "not_analyzed", "type": "string" }, "th": { "index": "not_analyzed", "type": "string" }, "lg": { "index": "not_analyzed", "type": "string" }, "seq": { "type": "long" }, "ts": { "format": "yyyy-MM-dd$HH:mm:ss.SSS", "type": "date" } } }}'