Have a question related to applying best_compression on indices that are already force-merged to 1 segment.
My question is: Can i still apply best_compression on them to save some disk space?
I suppose I can close, apply b_c and then open them.
While this post says that this should work, another post says in order for b_c to be effected, they need to be force-merged. Since my indices are already force-merged, I'm doubtful if applying b_c will have any benefits?
As segments are immutable I do believe you will need to forcemerge again. If you are already down to a single segment I suspect this would be a no-op, so you may need to add a dummy document that you then delete in order to create another segment.
Thanks Christian, as always, for being so helpful. A question: The recommendation is to never write to force-merged indices since force-merging is done only on RO indices. Or that we can write at times? I remember doing exactly what you mentioned a while back but not sure if this is recommended.
This is correct as it removes some of the benefits of forcemerging. Normally you should apply best_compression before forcemerging, so the approach I provided is merely a workaround in order to get the best_compression to apply.
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.