Hi, i'm trying to put a custom index in order to change the type of my field [Geolocation] (currently is string) which contain coordinates like "42.12356,72.23523". When I put the mapping i have an error:
To create the new mapping i indexed a sample of my data and i only modified the type of my field so i don't understand error ignore_above as it works with dynamic mapping.
Thank you in advance for your help.
Thanks for your response and advises @warkolm . I have ever read the doc but i don't understand how to represent it in my custom mapping.
I tried like this but it doesn't work
"Geolocation": {
"type": "geo_point as a string",
"norms": false,
"fields": {
"keyword": {
"type": "geo_point",
"location": "lat,lon"
"doc_values": true,
"ignore_above": 256
}
}
},
Sorry for lost time.
Thank you @warkolm. I modify my template as you suggest:
"Geolocation": {
"type": "geo_point"
},
and i modify my logstash.conf like this:
output {
elasticsearch {
hosts => "elasticsearch:9200"
template => "/config-dir/custom_mapping.json"
manage_template => true
template_overwrite => true
index => "logstash-meta"
It runs without any error but in my index the field Geolocation is always a string type. I test with the type "geo_point as a string" because my field Geolocation is [43.12345,73.123456] but it doesn't work.
Hello @dadoonet, yes I have deleted index before restart. For my tests I use a sample of data so I reindex the data for each test. My field "Geolocation" is a subfield extracted with a kv filter (with the option target => meta_pictures) from a field "metadata", in the mapping (GET /myindex) the name is Geolocation but in the index management it appears as meta_pictures.Geolocation. Thank you for your help.
The template seems not loaded. I run HEAD _/template/logstash-, the response is error 404 not found. If I run GET /_template/logstash-meta the response is { }
It should be an error in my json file but I'm not able to identify what is wrong with the documentation. The head of my json file is wrote as below:
{
"order": 0,
"version": 60001,
"index_patterns": [
"logstash-"
],
"settings": {
"index.number_of_replicas": "0",
"index": {
"refresh_interval": "5s"
}
},
"mappings": {
"doc": {
"properties": {
"@timestamp": {
"type": "date"
},
"@version": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
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.