Section navigation

Public classSealed IndexWriter

Namespace
Rowles.LeanCorpus.Index.Indexer
Assembly
Rowles.LeanCorpus.dll

Accepts documents, analyses text fields, buffers in memory, and flushes immutable segments to disk. Coordinates commit, backpressure, merge, snapshot, deletion, and DWPT subsystems via dedicated manager classes.

public sealed class IndexWriter : IDisposable
Inheritance
IndexWriter
Implements

Public constructor IndexWriter(MMapDirectory, IndexWriterConfig)

Initialises a new IndexWriter for the given directory with the specified configuration. Acquires an exclusive write lock on the directory. Only one writer may be open per directory at a time.

Public property CurrentCommitGeneration

Gets the latest locally published commit generation.

Public property CurrentContentToken

Gets the content token for the latest locally published commit.

Public property HasPreparedCommit

Public property NextSequenceNumber

Public method AddDocument(LeanDocument)

Adds one document to the index.

Public method AddDocumentAsync(LeanDocument, CancellationToken)

Adds one document asynchronously.

Public method AddDocumentBlock(IReadOnlyList<LeanDocument>)

Adds an adjacent child-parent document block.

Public method AddDocumentBlockAsync(IReadOnlyList<LeanDocument>, CancellationToken)

Adds an adjacent child-parent document block asynchronously.

Public method AddDocumentLockFree(LeanDocument)

Public method AddDocuments(IReadOnlyList<LeanDocument>)

Adds documents sequentially in list order.

Public method AddDocumentsAsync(IAsyncEnumerable<LeanDocument>, int, CancellationToken)

Adds documents from an asynchronous sequence in bounded batches.

Public method AddDocumentsAsync(IReadOnlyList<LeanDocument>, CancellationToken)

Adds documents asynchronously in list order.

Public method AddDocumentsConcurrent(IReadOnlyList<LeanDocument>)

Public method AddIndexes(MMapDirectory)

Public method BackupSnapshot(IndexSnapshot, string, IndexBackupOptions?)

Public method BackupSnapshot(IndexSnapshot, string, IndexBackupOptions?, CancellationToken)

Public method BackupSnapshot(IndexSnapshot, string, CancellationToken)

Public method Commit()

Public method CommitAsync(CancellationToken)

Public method Compact()

Public method CreateBackupManifest(IndexSnapshot)

Public method CreateSnapshot()

Public method DeleteDocuments(TermQuery)

Public method Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Public method ForceMerge(int)

Public method GetNrtSegments()

Public method InitialiseDwptPool(int)

Public method PrepareCommit()

Public method ReleaseSnapshot(IndexSnapshot)

Public method Rollback()

Public method SoftDeleteDocuments(TermQuery)

Public method UpdateDocument(string, string, LeanDocument)

Public method UpdateDocuments(Query, LeanDocument)