elasticsearch 未分析映射属性未正常工作
为了学习elasticsearch,我一直在做一个兼职项目。我正在使用Marvel插件发布elasticsearch项目的索引/映射。除了一个例外,一切正常。出于某种原因,在我的Kibana仪表板上,图表抓取值“country”并将其拆分为多个值(例如,“United”显示为两个单独的条目“United”和“State”),即使我在该字段中指示“index”:“not_Analysis” 这是我提供给弹性搜索的命令/索引/映射:elasticsearch 未分析映射属性未正常工作,elasticsearch,mapping,elasticsearch,Mapping,为了学习elasticsearch,我一直在做一个兼职项目。我正在使用Marvel插件发布elasticsearch项目的索引/映射。除了一个例外,一切正常。出于某种原因,在我的Kibana仪表板上,图表抓取值“country”并将其拆分为多个值(例如,“United”显示为两个单独的条目“United”和“State”),即使我在该字段中指示“index”:“not_Analysis” 这是我提供给弹性搜索的命令/索引/映射: PUT /traffic_mon {"traffic":
PUT /traffic_mon
{"traffic":
{
"_timestamp" : {
"enabled" : true,
"path" : "timestamp"
},
"properties": {
"timestamp": {"type": "date","format":"basic_date_time"},
"source_ip": {"type": "string"},
"dest_ip": {"type": "string"},
"country": {"type": "string", "index": "not_analyzed"},
"source_port": {"type": "integer"},
"destination_port": {"type": "integer"},
"traffic_type": {"type": "string"}
}
}
}
}
这是一个语法问题吗
我已经对这个问题进行了广泛的研究,但仍然无法找到导致这个问题的原因。正如我所说,我对elasticsearch还比较陌生,欢迎提供任何帮助/建议 我相信您需要点击_mappingAPI才能工作-
PUT /traffic_mon/traffic/_mapping
{
"traffic": {
"_timestamp": {
"enabled": true,
"path": "timestamp"
},
"properties": {
"timestamp": {
"type": "date",
"format": "basic_date_time"
},
"source_ip": {
"type": "string"
},
"dest_ip": {
"type": "string"
},
"country": {
"type": "string",
"index": "not_analyzed"
},
"source_port": {
"type": "integer"
},
"destination_port": {
"type": "integer"
},
"traffic_type": {
"type": "string"
}
}
}
}