i use the docker elk stack on macos with the logstash http pipeline to accept our apps http posts as input
it created an index (I didn't before)
reviewing the content, there are two fields that combined could make a geopoint, so I added that field thru the web UI. and I can use the visualizer to see the map of the points..
now I want my external app to use the qeopoint filter query on that field
result = await client.search({
index: 'logs-*',
"query": {
"bool": {
"must": {
"match_all": {}
},
"filter" : {
"geo_bounding_box" : {
"navigate_location" : { // <- the manually created field
"top_left" : {
"lat" : 34.73,
"lon" : -98.00
},
"bottom_right" : {
"lat" : 30.717,
"lon" : -97.030
}
}
}
}
}
}
when I query on other fields, I get the data record
2023 @ 11: 18:28.383event.original{
"devices": [],
"end": 1685981908383,
"retrycount": 0,
"type": 1,
"status": "canceled",
"appVersion": "1.0",
"location": {
"coords": {
"altitude": 235.09720251895487,
"longitude": -97.628558119899495, // part of constructed point
"altitudeAccuracy": 1.9524757439985525,
"speed": 0.021378767720873718,
"latitude": 30.463607267669115, / part of constructed point
"heading": -1,
"accuracy": 7.068291962625123
},
"timestamp": 1685981907000.032
},
"logtype": "navigate",
"phoneinfo": {
"manufacturer": "Apple",
"platform": "iOS",
"version": "16.5",
"model": "iPhone13,2"
},
"start": 1685981884953
}
but not the constructed field ..
when I try to add it to the index thru the developers console I get an error, already exists
when I dump out the mappings I see
"navigate_location": {
"type": "geo_point"
},
but I cant get it by name
get logs-generic-default/_mapping/navigate_location
yields
{
"error": "no handler found for uri [/logs-generic-default/_mapping/navigate_location?pretty=true] and method [GET]"
}
altho it just showed be the datatype mapping in that index...
how do I resolve this..