I am trying to import a CSV that contains Person Data to Elastic search,
everything is working fine the only problem is that I would like to change the Birth_date to "text" so i can use it for data matching but the problem is it is automatically set to "date" and i can`t find a solution to change it.
logstash will be treating that as a string by default. However, elasticsearch will convert that to a date if dynamic date detection is enabled (and it is on by default).
if i try to deactivate dynamic date detection it is not possible because the type is already created and data is added to it.
do i need to map the fields first and then add the data?
thats where i am stuck... if i use the import script that i posted the the fields are mapped dynamically and the data is added and i am not able to change the data type anymore.
In elasticsearch, once the type of a field is set, it cannot be changed. You would either need to disable dynamic date detection, or use a template to set the mapping. In either case you will need to create a new index.
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.