您需要为此
"index": "not_analyzed"工作。并且您需要为数据重新索引以使上述更改生效。
这是映射更改和一些测试数据的命令的完整列表:
PUT /merged-2016-04{ "mappings": { "timeslot": { "properties": { "FOB_IN": { "type": "long" }, "TRIGGER_CODE": { "type": "long" }, "FLIGHT_PHASE": { "type": "long" }, "REP16_TRIG": { "type": "long" }, "fwot": { "type": "string", "index": "not_analyzed" }, "FOB_OUT": { "type": "long" }, "FP": { "type": "long" }, "FLTNB": { "type": "string" }, "Date": { "format": "strict_date_optional_time||epoch_millis", "type": "date" } } } }}POST /merged-2016-04/timeslot{ "Date": "2016-04-03T08:42:44+0000", "FLIGHT_PHASE": 20, "TRIGGER_CODE": 4000, "fwot": "A6-APA"}GET merged-2016-04/_search?size=1{ "query": { "term": { "fwot": "A6-APA" } }}


