We have a problem loading geo_point data, the index template, after some tests, now is configured as:
location..........conflict
location.lat.....number
location.lon....number
So, when I try to create a map visualization there is no data.
We load the data from Logstash:
mutate {
add_field => [ "[geolocation][lat]", "%{lat}" ]
add_field => [ "[geolocation][lon]", "%{lng}" ]
convert => {
"[geolocation][lat]" => "float"
"[geolocation][lon]" => "float"
}
remove_field => [ "lat", "lng" ]
}
Until update to 7.2 it was working fine.
Something has changed or something we've started doing wrong, any ideas will be welcome.
That was working but just for the existent data, the new data is agreggated in another index name and so it fails again. We have indexes in this format:
statsxxx-20190801
statsyyy-20190801
statsxxx-20190802
statsyyy-20190802
...
the problem is that when we try to put:
PUT stats*
{
"mappings": {
"properties": {
"location": {
"type": "geo_point"
}
}
}
}
we receive the next error:
{
"error": {
"root_cause": [
{
"type": "security_exception",
"reason": "action [indices:admin/create] is unauthorized for user [elastic]"
}
],
"type": "security_exception",
"reason": "action [indices:admin/create] is unauthorized for user [elastic]",
"caused_by": {
"type": "illegal_state_exception",
"reason": "There are no external requests known to support wildcards that don't support replacing their indices"
}
},
"status": 403
}
we have activated the x-pack and configured the security, we're logged with user "elastic" that has, at least we think so, all the privileges, has superuser role.
Thank you,
Yes use an index template see here it is exactly for this case.
It will be applied to all new indices that fit the pattern apologies I should have showed you this at first I just wasn't sure what you were trying to accomplish.
it would look something like this and every new index created with the pattern will apply this mapping
Thank you Stephen, the template did the trick, everything is working fine.
Now, I think I'm going to open a new thread, I'd like that each point drawed in the map show more information when you get the mouse over a single point, right now is displayed the latitude and longitude information, but I'd like to show other fields with more valuable information, I'm not sure if this is possible...
That probably means there is more than 1 type of data for that field name for the indexes that the pattern applies too, meaning most likelly the pattern points to 1 or indexes that has the right data type geo_point and 1 or more that points to an index (probably before you create the mapping) that has the wrong data type.
I have deleted all existing indices, getting below error
[2019-09-18T05:40:54,063][WARN ][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"file-2019.09.18", :_type=>"doc", :_routing=>nil}, #LogStash::Event:0x2203d9e7], :response=>{"index"=>{"_index"=>"file-2019.09.18", "_type"=>"doc", "_id"=>nil, "status"=>400, "error"=>{"type"=>"illegal_argument_exception", "reason"=>"Rejecting mapping update to [file-2019.09.18] as the final mapping would have more than 1 type: [_doc, doc]"}}}}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.