Table of Contents

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

heapBytes long

Total indexing memory budget, split across indexing threads. Each thread needs at least 15 MB, so Tantivy uses fewer threads if the budget is small.

threadCount int?

Number of indexing threads, or null to let Tantivy choose (at most 8).

Returns

IndexWriter

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

options IndexWriterOptions

Returns

IndexWriter

Exceptions

TantivyException

With LockBusy if another writer is open.