gpt4 book ai didi

elasticsearch - Elasticsearch geoip.location映射为double而不是geo_point

转载 作者:行者123 更新时间:2023-12-03 02:00:10 27 4
gpt4 key购买 nike

我正在运行Elasticsearch 1.5.2版。
Logstash版本1.5.4。

大多数logstash设置为默认设置:

geoip {
source => "ipaddress"
}


output {
elasticsearch {
host => "127.0.0.1"
port => 9200
protocol => http
user => searchguard
password => somepassword
}

在Kibana中,当我尝试设置图块 map 时,看到此错误:

"No Compatible Fields: The "[logstash-]YYYY.MM.DD" index pattern does not contain any of the following field types: geo_point"



我检查了映射“ http://localhost:9200/logstash-2015.09.15?pretty”,geoip.location被映射为double而不是geo_point。

有什么建议如何正确映射吗?

更多信息:

curl -XGET本地主机:9200 / logstash-2015.09.15 / _mapping
{
"logstash-2015.09.15": {
"mappings": {
"logs": {
"properties": {
"@timestamp": {
"type": "date",
"format": "dateOptionalTime"
},
"@version": {
"type": "string"
},
"csbytes": {
"type": "long"
},
"geoip": {
"properties": {
"area_code": {
"type": "long"
},
"city_name": {
"type": "string"
},
"continent_code": {
"type": "string"
},
"country_code2": {
"type": "string"
},
"country_code3": {
"type": "string"
},
"country_name": {
"type": "string"
},
"dma_code": {
"type": "long"
},
"ip": {
"type": "string"
},
"latitude": {
"type": "double"
},
"location": {
"type": "double"
},
"longitude": {
"type": "double"
},
"postal_code": {
"type": "string"
},
"real_region_name": {
"type": "string"
},
"region_name": {
"type": "string"
},
"timezone": {
"type": "string"
}
}
},
"ipaddress": {
"type": "string"
},
"log_timestamp": {
"type": "string"
},
"message": {
"type": "string"
},
"method": {
"type": "string"
},
"referer": {
"type": "string"
},
"scbytes": {
"type": "long"
},
"scstatus": {
"type": "long"
},
"tags": {
"type": "string"
},
"timetaken": {
"type": "long"
},
"useragent": {
"type": "string"
},
"username": {
"type": "string"
}
}
}
}
}
}

curl -XGET本地主机:9200 / _template / logstash

这是空的{}

我正在使用默认值。我尚未编辑默认模板。

最佳答案

看看这个geo-point data type。只能手动设置geo_point的映射(if i am not mistaken)

关于elasticsearch - Elasticsearch geoip.location映射为double而不是geo_point,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33558191/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com