This document discusses optimizing Solr for near real-time indexing of large datasets. The author describes benchmarking different indexing configurations, finding that batching documents by time, size or number provides much higher indexing throughput than single documents. The author proposes a PID controller to dynamically adjust batching parameters based on indexing performance. Future work includes refining the PID controller, integrating it with benchmarking tools, and using it for hardware sizing.