Class ConcurrentMergeScheduler
A MergeScheduler that runs each merge using a separate thread, up until a maximum number of threads (MaxThreadCount) at which when a merge is needed, the thread(s) that are updating the index will pause until one or more merges completes. This is a simple way to use concurrency in the indexing process without having to create and manage application level threads.
Namespace:
Assembly: Lucene.Net.NetCore.dll
Syntax
public class ConcurrentMergeScheduler : MergeScheduler
Constructors
Name | Description |
---|---|
ConcurrentMergeScheduler() |
Fields
Name | Description |
---|---|
dir | |
mergeThreadCount | |
mergeThreads | |
writer |
Properties
Name | Description |
---|---|
MaxThreadCount | Gets or sets the max # simultaneous threads that may be running. If a merge is necessary yet we already have this many threads running, the incoming thread (that is calling add/updateDocument) will block until a merge thread has completed. |
Methods
Name | Description |
---|---|
AnyUnhandledExceptions() | Used for testing |
ClearSuppressExceptions() | Used for testing |
ClearUnhandledExceptions() | |
Dispose(Boolean) | |
DoMerge(MergePolicy.OneMerge) | Does the actual merge, by calling Lucene.Net.Index.IndexWriter.Merge(Lucene.Net.Index.MergePolicy.OneMerge) |
GetMergeThread(IndexWriter, MergePolicy.OneMerge) | Create and return a new MergeThread |
GetMergeThreadPriority() | Return the priority that merge threads run at. By default the priority is 1 plus the priority of (ie, slightly higher priority than) the first thread that calls merge. |
HandleMergeException(Exception) | Called when an exception is hit in a background merge thread |
Merge(IndexWriter) | |
SetMergeThreadPriority(Int32) | Set the priority that merge threads run at. |
SetSuppressExceptions() | Used for testing |
SetTestMode() | |
Sync() |