The LogDocMergePolicy type exposes the following members.

Constructors

  NameDescription
Public methodLogDocMergePolicy
Initializes a new instance of the LogDocMergePolicy class

Methods

  NameDescription
Public methodClose (Inherited from LogMergePolicy.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFindMerges
Checks if any merges are now necessary and returns a {@link MergePolicy.MergeSpecification} if so. A merge is necessary when there are more than {@link #setMergeFactor} segments at a given level. When multiple levels have too many segments, this method will return multiple merges, allowing the {@link MergeScheduler} to use concurrency.
(Inherited from LogMergePolicy.)
Public methodFindMergesForOptimize
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 {@link MergeScheduler} in use may make use of concurrency.
(Inherited from LogMergePolicy.)
Public methodFindMergesToExpungeDeletes
Finds merges necessary to expunge all deletes from the index. We simply merge adjacent segments that have deletes, up to mergeFactor at a time.
(Inherited from LogMergePolicy.)
Public methodGetCalibrateSizeByDeletes
Returns true if the segment size should be calibrated by the number of deletes when choosing segments for merge.
(Inherited from LogMergePolicy.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetMaxMergeDocs
Returns the largest segment (measured by document count) that may be merged with other segments.
(Inherited from LogMergePolicy.)
Public methodGetMergeFactor

Returns the number of segments that are merged at once and also controls the total number of segments allowed to accumulate in the index.

(Inherited from LogMergePolicy.)
Public methodGetMinMergeDocs
Get the minimum size for a segment to remain un-merged.
Public methodGetNoCFSRatio (Inherited from LogMergePolicy.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetUseCompoundDocStore
Returns true if newly flushed and newly merge doc store segment files (term vectors and stored fields)
(Inherited from LogMergePolicy.)
Public methodGetUseCompoundFile
Returns true if newly flushed and newly merge segments
(Inherited from LogMergePolicy.)
Protected methodMakeOneMerge (Inherited from LogMergePolicy.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSetCalibrateSizeByDeletes
Sets whether the segment size should be calibrated by the number of deletes when choosing segments for merge.
(Inherited from LogMergePolicy.)
Public methodSetMaxMergeDocs

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.

The default value is {@link Integer#MAX_VALUE}.

The default merge policy ({@link LogByteSizeMergePolicy}) also allows you to set this limit by net size (in MB) of the segment, using {@link LogByteSizeMergePolicy#setMaxMergeMB}.

(Inherited from LogMergePolicy.)
Public methodSetMergeFactor
Determines 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.
(Inherited from LogMergePolicy.)
Public methodSetMinMergeDocs
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).
Public methodSetNoCFSRatio (Inherited from LogMergePolicy.)
Public methodSetUseCompoundDocStore
Sets whether compound file format should be used for newly flushed and newly merged doc store segment files (term vectors and stored fields).
(Inherited from LogMergePolicy.)
Public methodSetUseCompoundFile
Sets whether compound file format should be used for newly flushed and newly merged segments.
(Inherited from LogMergePolicy.)
Protected methodSize (Overrides LogMergePolicy..::..Size(SegmentInfo).)
Protected methodSizeBytes (Inherited from LogMergePolicy.)
Protected methodSizeDocs (Inherited from LogMergePolicy.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Public methodUseCompoundDocStore (Inherited from LogMergePolicy.)
Public methodUseCompoundFile (Inherited from LogMergePolicy.)
Protected methodVerbose (Inherited from LogMergePolicy.)

Fields

  NameDescription
Protected fieldcalibrateSizeByDeletes (Inherited from LogMergePolicy.)
Public fieldStatic memberDEFAULT_MIN_MERGE_DOCS
Protected fieldnoCFSRatio (Inherited from LogMergePolicy.)
Protected fieldwriter (Inherited from MergePolicy.)

See Also