We are using Elasticsearch - 2.3.5 for feeding the Amazon Cloudtrail data. We have created mapping for a index and for certain fields their type will changes automatically. We want certain fields to use particular date format.
By default dynamic mapping is enabled. So we have scenarios where new fields can be added so we need dynamic mapping.
You can not change existing mappings for fields in Elasticsearch, but mappings can be identified differently for new indices when using dynamic mappings, depending on what the data in the first encountered field look like. You can control this using index templates.
We are not trying to update the existing index. We were trying to create new index with a mapping but it will change once the data is fed to that index. We need to avoid this
In order to guarantee consistent mappings across indices you can use index templates or possibly drive the mapping based on naming conventions for fields.
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.