I am creating the index template and define mapping in it.
Default Elasticsearch Settings
Sent data of size (on disk) 737 MB (173,170 Documents) to Elasticsearch, its size on elasticsearch is 320.1mb (default elasticsearch index setting)
Template Settings
Then I created a template and sent same data again.
Do you have the exact same scenario and data when you are doing your tests?
To do a real comparison you should call at the end the _forcemerge API and merge to one single segment.
Thanks for your response David.
Yes, I have exact same scenario and data for this test.
How do i use the _forcemerge API in the end while using template :
Compression typically improves with shard size, so to make fair comparison I would recommend you to index into an index with a single primary shard. As the size on disk will fluctuate as segments are merged in the background, it is important to force merge down to a single segment once indexing has completed as the indices otherwise could be in varying stages of merging.
Thanks David, But that's not what we would want because if we use this manually, then we would need to do this for every index.
The scenario here is that i want to create a template for a particular index pattern so that if any index that follows that particular pattern would be created automatically using the template settings. And I want dynamic mapping in it.
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.