I had an index with: 257,947,981 documents and it was 1.28TB
Then I did some bulk updates to that index which ended up being: 257,997,034 docs and 1.56TB
Then for sh*ts and giggles I ran POST /my-index/_optimize?max_num_segments=1
Now running the optimize API the index size has grown to 1.7TB
Each shard is about 60 segments each except one is at 40.
Will this really reduces all shards to 1 segments or best it can?
Also will this eventually end up saving space?
And how long should I expect this to execute?
An index won't grow in size if you optimise, it removes any deleted docs and then merges the segments. I'd say there was more indexing happening at the same time.
An optimise will take as long as it takes, it's dependant on the size of the index, load on the system, IO speeds etc etc.
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.