Concurrent indexing
IndexWriter is thread-safe for AddDocument. For high-throughput ingest, use the concurrent path.
Multi-threaded add
var docs = LoadDocuments();
Parallel.ForEach(docs, doc => writer.AddDocument(doc));
writer.Commit();
Concurrent pipeline
writer.AddDocumentsConcurrent(docs);
MaxQueuedDocs (default 20_000) caps the in-flight queue. MaxBufferedDocs and RamBufferSizeMB govern when a flush fires.
Pre-warm DWPT pool
DWPTs are created lazily. Pre-warm for consistent latency:
writer.InitialiseDwptPool();