Accepting late events after force-merge

As mentioned in docs, when we define force-merge as part of an ILM policy, it also makes the index read-only. I want to force-merge an index to compact it and get some size benefit but I don't want to make it read-only. I want to continue accepting late events after the index has been compacted. Should I manually remove the read-only status for the indices after segment merging is complete ?

No, you should not write to an index after it has been force-merged. From the docs:

WARNING: Force merge should only be called against an index after you have finished writing to it. Force merge can cause very large (>5GB) segments to be produced, and if you continue to write to such an index then the automatic merge policy will never consider these segments for future merges until they mostly consist of deleted documents. This can cause very large segments to remain in the index which can result in increased disk usage and worse search performance.

Thank you for the explanation and the reference @DavidTurner. I should have seen that doc.

Pure speculation ahead
I wonder if there is any compaction option which reduces a bit of disk footprint but does not do it till the extent of creating huge segments as force-merge does. What I am trying to say is force-merge creates segments which at one end of optimization. Regular indices would be unoptimized. I am thinking is there any operation that optimizes the index a bit but not completely.

This is what the usual (automatic) background merge process does.

Great. Thanks for clarifying.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.