1、新建一个索引waybill
curl -XPUT http://10.118.58.67:9200/waybill
2、为索引添加type及type的mapping,注意:对于需要完全精确匹配的字段需要设置为string类型、index方式为not_analyzed。字段类型创建后无法修改。
curl -XPUT http://10.116.50.223:9200/waybill/details/_mapping?pretty-d '
{"details":{"properties":
{"backnewway":{"type":"string","index":"not_analyzed"},
"barscantm":{"type":"long"},
"calhour":{"type":"long"},"caltime":{"type":"long"},
"collectondelivery":{"type":"string","index":"not_analyzed"},
"consigneddt":{"type":"long"},"consignedtm":{"type":"long"},
"custno":{"type":"string","index":"not_analyzed"},
"describle":{"type":"string","index":"n