C# Класс Rebel.Lucene.IndexController

A simple index controller centred around asynchronous queuing of index modifications.
Наследование: DisposableObject, IRequiresFrameworkContext
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CreateDisposableReader ( ) : IndexReader

Creates an index reader. The caller is responsible for disposing the reader when done.

ForceFlushQueue ( ) : void
GetScopedLuceneSearcher ( ) : IndexSearcher

Gets an index searcher by using the reader whose lifetime is managed by GetScopedReader.

GetScopedReader ( ) : IndexReader

Gets a reader that is added to IFrameworkContext.ScopedCache, or returns the one already added. Disposal is handled by IFrameworkContext.ScopedFinalizer.

IndexController ( IndexConfiguration configuration, Func frameworkContextGetter ) : System
IndexController ( IndexConfiguration configuration, IFrameworkContext frameworkContext ) : System
Initialise ( ) : void
PartialFlushQueue ( int flushLimit ) : void
QueueAdd ( Document document ) : void

Queues the addition of an index document.

QueueBatch ( ) : void

Queues a batch of index modifications.

QueueRemoveAll ( ) : void

Queues the removal of all index documents.

Caller should also call ForceFlushQueue if they wish to block until the removal is flushed.

QueueRemoveWhere ( Term term ) : void

Queues the removal of an index document matching the supplied term.

Защищенные методы

Метод Описание
DisposeResources ( ) : void
FlushQueue ( ) : void

Приватные методы

Метод Описание
CreateLuceneReader ( ) : global::Lucene.Net.Index.IndexReader
CreateLuceneReader ( global::Lucene.Net.Store.Directory directory, bool secondAttempt = false ) : global::Lucene.Net.Index.IndexReader
CreateLuceneWriter ( ) : IndexWriter
CreateLuceneWriter ( StandardAnalyzer standardAnalyzer, global::Lucene.Net.Store.Directory directory ) : IndexWriter
CreateTransactionWorker ( ) : TransactionalIndexWorker
EnactBatch ( TransactionalIndexWorker worker, IndexModificationBatch batch ) : void
GetAnalyzer ( ) : StandardAnalyzer
GetBuildLocationInfo ( ) : DirectoryInfo
GetLuceneDirectory ( ) : global::Lucene.Net.Store.Directory
GetLuceneDirectory ( DirectoryInfo directory ) : global::Lucene.Net.Store.Directory
InitialiseBlankIndex ( global::Lucene.Net.Store.Directory directory ) : void
LogQueueMonitorError ( string logMessage, Exception exception ) : void
MonitorIndexBatch ( ) : void

Repeatedly checks IndexModificationQueue for new batches, and calls FlushQueue if any are found.

SetFrameworkContext ( IFrameworkContext frameworkContext ) : void

Sets the framework context. Used within IoC registration to avoid a circular reference / stack overflow because IFrameworkContext has Caches which could have this provider, which needs an IFrameworkContext

StartQueueMonitor ( ) : void

Starts the queue monitor Task.

Описание методов

CreateDisposableReader() публичный Метод

Creates an index reader. The caller is responsible for disposing the reader when done.
public CreateDisposableReader ( ) : IndexReader
Результат IndexReader

DisposeResources() защищенный Метод

protected DisposeResources ( ) : void
Результат void

FlushQueue() защищенный Метод

protected FlushQueue ( ) : void
Результат void

ForceFlushQueue() публичный Метод

public ForceFlushQueue ( ) : void
Результат void

GetScopedLuceneSearcher() публичный Метод

Gets an index searcher by using the reader whose lifetime is managed by GetScopedReader.
public GetScopedLuceneSearcher ( ) : IndexSearcher
Результат IndexSearcher

GetScopedReader() публичный Метод

Gets a reader that is added to IFrameworkContext.ScopedCache, or returns the one already added. Disposal is handled by IFrameworkContext.ScopedFinalizer.
public GetScopedReader ( ) : IndexReader
Результат IndexReader

IndexController() публичный Метод

public IndexController ( IndexConfiguration configuration, Func frameworkContextGetter ) : System
configuration IndexConfiguration
frameworkContextGetter Func
Результат System

IndexController() публичный Метод

public IndexController ( IndexConfiguration configuration, IFrameworkContext frameworkContext ) : System
configuration IndexConfiguration
frameworkContext IFrameworkContext
Результат System

Initialise() публичный Метод

public Initialise ( ) : void
Результат void

PartialFlushQueue() публичный Метод

public PartialFlushQueue ( int flushLimit ) : void
flushLimit int
Результат void

QueueAdd() публичный Метод

Queues the addition of an index document.
public QueueAdd ( Document document ) : void
document Document The document.
Результат void

QueueBatch() публичный Метод

Queues a batch of index modifications.
public QueueBatch ( ) : void
Результат void

QueueRemoveAll() публичный Метод

Queues the removal of all index documents.
Caller should also call ForceFlushQueue if they wish to block until the removal is flushed.
public QueueRemoveAll ( ) : void
Результат void

QueueRemoveWhere() публичный Метод

Queues the removal of an index document matching the supplied term.
public QueueRemoveWhere ( Term term ) : void
term Term The term.
Результат void