Hi everyone,
I'm working with a set of GeoIP data that includes multiple entries identified by resolved_ip
. I initially tried using the nested
type to display the data on Kibana Maps, but nothing appears on the map.
I also attempted to use geo_shape
for location data, but it seems I’m unable to search or visualize locations based on resolved_ip
.
Below is a sample of my data and the current index mapping I’m using:
Any suggestions or guidance would be greatly appreciated!
Here is my data and current mappings
{
"points": [
{
"resolved_ip": "38.145.60.21",
"location": { "lat": 33.304, "lon": -111.8478 },
"city": "Chandler",
"country": {
"iso": "US",
"name": "United States"
}
},
{
"resolved_ip": "13.233.161.229",
"location": { "lat": 19.0748, "lon": 72.8856 },
"city": "Mumbai",
"country": {
"iso": "IN",
"name": "India"
}
},
{
"resolved_ip": "18.136.235.60",
"location": { "lat": 1.2868, "lon": 103.8503 },
"city": "Singapore",
"country": {
"iso": "SG",
"name": "Singapore"
}
},
{
"resolved_ip": "38.145.60.20",
"location": { "lat": 33.304, "lon": -111.8478 },
"city": "Chandler",
"country": {
"iso": "US",
"name": "United States"
}
},
{
"resolved_ip": "54.254.22.88",
"location": { "lat": 1.2868, "lon": 103.8503 },
"city": "Singapore",
"country": {
"iso": "SG",
"name": "Singapore"
}
}
]
}
PUT /geo-index-geo-shape-2
{
"mappings": {
"properties": {
"points": {
"type": "nested",
"properties": {
"resolved_ip": { "type": "ip" },
"location": { "type": "geo_point" },
"city": { "type": "text" },
"country": {
"properties": {
"iso": { "type": "keyword" },
"name": { "type": "text" }
}
}
}
}
}
}
}