Lucene.Net
3.0.3
Lucene.Net is a .NET port of the Java Lucene Indexing Library
|
This is a LogMergePolicy that measures size of a segment as the total byte size of the segment's files. More...
Inherits Lucene.Net.Index.LogMergePolicy.
Public Member Functions | |
LogByteSizeMergePolicy (IndexWriter writer) | |
Public Member Functions inherited from Lucene.Net.Index.LogMergePolicy | |
override bool | UseCompoundFile (SegmentInfos infos, SegmentInfo info) |
Returns true if a newly flushed (not from merge) segment should use the compound file format. | |
virtual void | SetUseCompoundFile (bool useCompoundFile) |
Gets or sets whether compound file format should be used for newly flushed and newly merged segments. | |
virtual bool | GetUseCompoundFile () |
override bool | UseCompoundDocStore (SegmentInfos infos) |
Returns true if the doc store files should use the compound file format. | |
virtual void | SetUseCompoundDocStore (bool useCompoundDocStore) |
Sets whether compound file format should be used for newly flushed and newly merged doc store segment files (term vectors and stored fields). | |
virtual bool | GetUseCompoundDocStore () |
Returns true if newly flushed and newly merge doc store segment files (term vectors and stored fields) | |
override MergeSpecification | FindMergesForOptimize (SegmentInfos infos, int maxNumSegments, ISet< SegmentInfo > segmentsToOptimize) |
Returns the merges necessary to optimize the index. This merge policy defines "optimized" to mean only one segment in the index, where that segment has no deletions pending nor separate norms, and it is in compound file format if the current useCompoundFile setting is true. This method returns multiple merges (mergeFactor at a time) so the MergeScheduler in use may make use of concurrency. | |
override MergeSpecification | FindMergesToExpungeDeletes (SegmentInfos segmentInfos) |
Finds merges necessary to expunge all deletes from the index. We simply merge adjacent segments that have deletes, up to mergeFactor at a time. | |
override MergeSpecification | FindMerges (SegmentInfos infos) |
Checks if any merges are now necessary and returns a MergePolicy.MergeSpecification if so. A merge is necessary when there are more than MergeFactor segments at a given level. When multiple levels have too many segments, this method will return multiple merges, allowing the MergeScheduler to use concurrency. | |
Public Member Functions inherited from Lucene.Net.Index.MergePolicy | |
void | Close () |
Release all resources for the policy. | |
void | Dispose () |
Release all resources for the policy. | |
Public Attributes | |
const double | DEFAULT_MIN_MERGE_MB = 1.6 |
Public Attributes inherited from Lucene.Net.Index.LogMergePolicy | |
const double | LEVEL_LOG_SPAN = 0.75 |
Defines the allowed range of log(size) for each level. A level is computed by taking the max segment log size, minus LEVEL_LOG_SPAN, and finding all segments falling within that range. | |
const int | DEFAULT_MERGE_FACTOR = 10 |
Default merge factor, which is how many segments are merged at a time | |
Static Public Attributes | |
static readonly long | DEFAULT_MAX_MERGE_MB = long.MaxValue |
Default maximum segment size. A segment of this size | |
Static Public Attributes inherited from Lucene.Net.Index.LogMergePolicy | |
static readonly int | DEFAULT_MAX_MERGE_DOCS = System.Int32.MaxValue |
Default maximum segment size. A segment of this size | |
static double | DEFAULT_NO_CFS_RATIO = 0.1 |
Default noCFSRatio. If a merge's size is >= 10% of the index, then we disable compound file for it. See NoCFSRatio | |
Protected Member Functions | |
override void | Dispose (bool disposing) |
Protected Member Functions inherited from Lucene.Net.Index.LogMergePolicy | |
LogMergePolicy (IndexWriter writer) | |
OneMerge | MakeOneMerge (SegmentInfos infos, SegmentInfos infosToMerge) |
Protected Member Functions inherited from Lucene.Net.Index.MergePolicy | |
MergePolicy (IndexWriter writer) | |
Properties | |
virtual double | MaxMergeMB [get, set] |
Gets or sets the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments. Small values (e.g., less than 50 MB) are best for interactive indexing, as this limits the length of pauses while indexing to a few seconds. Larger values are best for batched indexing and speedier searches. | |
virtual double | MinMergeMB [get, set] |
Gets or sets the minimum size for the lowest level segments. Any segments below this size are considered to be on the same level (even if they vary drastically in size) and will be merged whenever there are mergeFactor of them. This effectively truncates the "long tail" of small segments that would otherwise be created into a single level. If you set this too large, it could greatly increase the merging cost during indexing (if you flush many small segments). | |
Properties inherited from Lucene.Net.Index.LogMergePolicy | |
double | NoCFSRatio [get, set] |
virtual int | MergeFactor [get, set] |
Gets or sets how often segment indices are merged by addDocument(). With smaller values, less RAM is used while indexing, and searches on unoptimized indices are faster, but indexing speed is slower. With larger values, more RAM is used during indexing, and while searches on unoptimized indices are slower, indexing is faster. Thus larger values (> 10) are best for batch index creation, and smaller values (< 10) for indices that are interactively maintained. | |
virtual bool | CalibrateSizeByDeletes [get, set] |
Gets or sets whether the segment size should be calibrated by the number of deletes when choosing segments for merge. | |
virtual int | MaxMergeDocs [get, set] |
Gets or sets the largest segment (measured by document count) that may be merged with other segments. Determines the largest segment (measured by document count) that may be merged with other segments. Small values (e.g., less than 10,000) are best for interactive indexing, as this limits the length of pauses while indexing to a few seconds. Larger values are best for batched indexing and speedier searches. | |
Additional Inherited Members | |
Protected Attributes inherited from Lucene.Net.Index.LogMergePolicy | |
double | internalNoCFSRatio = DEFAULT_NO_CFS_RATIO |
This is a LogMergePolicy that measures size of a segment as the total byte size of the segment's files.
Definition at line 26 of file LogByteSizeMergePolicy.cs.
Lucene.Net.Index.LogByteSizeMergePolicy.LogByteSizeMergePolicy | ( | IndexWriter | writer | ) |
Definition at line 38 of file LogByteSizeMergePolicy.cs.
|
protectedvirtual |
Implements Lucene.Net.Index.MergePolicy.
Definition at line 51 of file LogByteSizeMergePolicy.cs.
|
static |
Default maximum segment size. A segment of this size
Definition at line 36 of file LogByteSizeMergePolicy.cs.
const double Lucene.Net.Index.LogByteSizeMergePolicy.DEFAULT_MIN_MERGE_MB = 1.6 |
Definition at line 31 of file LogByteSizeMergePolicy.cs.
|
getset |
Gets or sets the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments. Small values (e.g., less than 50 MB) are best for interactive indexing, as this limits the length of pauses while indexing to a few seconds. Larger values are best for batched indexing and speedier searches.
Note that IndexWriter.MaxMergeDocs is also used to check whether a segment is too large for merging (it's either or).
Definition at line 70 of file LogByteSizeMergePolicy.cs.
|
getset |
Gets or sets the minimum size for the lowest level segments. Any segments below this size are considered to be on the same level (even if they vary drastically in size) and will be merged whenever there are mergeFactor of them. This effectively truncates the "long tail" of small segments that would otherwise be created into a single level. If you set this too large, it could greatly increase the merging cost during indexing (if you flush many small segments).
Definition at line 94 of file LogByteSizeMergePolicy.cs.