I need to change field type, but I don't know how knowing that I'm using logstash for importing data from CSV file so I didn't specify the field type manually and I think the default value is a string, but I need to change it to long or integer, what is the command that allows updating mapping settings or at least fields type?
You cannot do that. If you want to force a non-default data type, in most cases you need to explicitly specify it in the mapping definition (there are some exception such as geo_point, which can be recognized by name)
I tried to create manually a mapping when I check the result it seems working even with having some weirds warnings when I use logstash command but concretly it behaves like a string I mean when I try to do for exemple 1+1 (1 is my field value) it returns 11 not 2 !!!!
You should check if the field type has changed. You are not able to change a field type if it is already there. For example if you put a data entry without defining a field mapping, a field mapping with default type will be created and you cannot change it. You have to delete and recreate the index
Yes that exactly what I did ! I deleted my index and I created the mapping and then I sended the data from CSV file with logstash. that seems working when I check the new type but logstash display a warning
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.