Method CreateWriter
- Namespace
- TantivyDotNet
- Assembly
- TantivyDotNet.dll
CreateWriter(long, int?)
Creates the index's writer. Only one writer can exist per index at a time; dispose the previous one first.
public IndexWriter CreateWriter(long heapBytes = 50000000, int? threadCount = null)
Parameters
heapByteslongTotal indexing memory budget, split across indexing threads. Each thread needs at least 15 MB, so Tantivy uses fewer threads if the budget is small.
threadCountint?Number of indexing threads, or null to let Tantivy choose (at most 8).
Returns
Exceptions
- TantivyException
With LockBusy if another writer is open.
CreateWriter(IndexWriterOptions)
Creates the index's writer with options. Only one writer can exist per
index at a time; dispose the previous one first.
public IndexWriter CreateWriter(IndexWriterOptions options)
Parameters
optionsIndexWriterOptions
Returns
Exceptions
- TantivyException
With LockBusy if another writer is open.