While implementing and testing a text document Java-based index, one of my main problems was an OutOfMemoryException. This happened quite often since the size of the collection was pretty large.
I did try to increase the heap size, but this did not really solve the problem. How do you handle processing large batches of data without exceeding the memory limits?