What does the scheduled task IndexOptimization do?

In my accelerator setup there is a scheduled task called IndexOptimization

<scheduledTask type="Litium.Foundation.Search.IndexOptimization, Litium.Foundation" startTime="02:00" interval="1d" />

What does it do?

Index optimization is a way to clean up deleted index document from the physical index file on disc. Without optimization the deleted document will still be in the physical index files but marked as deleted and before the are removed from the files they still take disk space.

Index files that do not have deleted documents is faster for lucene to search in.