I was testing _forcemerge and segment sizing. To start with, i used below command to see how many segments were in my index
get _cat/segments/mycontents?v
The above returned around 41 segments, that varied is sizes from 1 MB to 3 GB. There were around 17 segments around 2+ gb and rest all were below 150 MB. My understanding is that issuing the below command will do optimize the segments by merging to similar size
post /mycontents/_forcemerge
Though executing the same provided success message {..."successful": 1..,} I didn't see any change in segment list interms of size or documents.
CHecked if there are any pending tasks using get _cluster/pending_tasks, but resulted with empty task array.
Not sure if I'm missing something.
Over and above the issue, I also have below queries
- What would be optimum size of a segment?
- How ES computes what is the appropriate segment size. Can I configure it if I determine my shard size to be 50GB?
- What would be the best segment size if we have highly varying document sizes. If we have more smaller documents go to single segment, the segment size might get to a normal zone - but more documents it will have when compared to other segments of the shard. What will be its impact?
Thanks for clarification