I am new to Elasticsearch. I am sending the Purelytics data from Dynatrace to ES and can see the data on Kibana. we have observed that data.startTime and data.endTime of JSON documents are mapped to Number data type. We are not able to modify the existing index data types. So, I have created the new index and modified the mappings of data.startTime and endTime to Date format, able to see that change in ES but not reflected on Kibana webpage. So could you please suggest what would be the better option to do so.
Hmm, so you deleted the old indices with the incorrect mappings and the index pattern is pointing at the new indices with the correct mappings? What version of Kibana and ES are you using?
Does the existing kibana index pattern match both the old indices and new indices you reindexed into? It sounds like you might need to create a new index pattern that only matches the new indices.
Right. Does your index-pattern in Kibana match the names of the old indices, the new indices, or both? If the index-pattern in Kibana still matches the names of the old indices, it's still going to pick up field info from their mappings.
Yes, if you no longer need the old indices it would probably be best to delete them.
Is there any way to update the data types while re indexing the data?
Generally what you'll want to do is define an index template that will match the new index name. The index template will allow you to define the correct mappings ahead of time.
I am taking the data from another server so whenever i am creating the index it automatically creating the mapping backend itself.So i am asking how can i edit such mapping?
Do your indices follow a naming convention? If you create an index template before the concrete indices are created, it will match new index names based on the pattern you provide and apply its settings to the new index. So for instance if I defined an index template with the pattern logstash-* and then created a new index called logstash-2017-07-18 the template would match and apply its settings to this new index. Templates only apply at index creation time and mappings cannot be edited after index creation, so for existing indices you would need to re-index after creating this index template.
I have deleted all existing indices and created index template and one new index but the data is mapping to old index.how can i delete that old index permanently.
Finally, if you mean that the old mappings are still showing up in Kibana, you'll either need to refresh the field list or recreate the index pattern in Kibana after you've got the mappings sorted out in Elasticsearch.
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.