|
| LogByteSizeMergePolicy (const IndexWriterPtr &writer) |
|
virtual | ~LogByteSizeMergePolicy () |
|
virtual String | getClassName () |
|
boost::shared_ptr< LogByteSizeMergePolicy > | shared_from_this () |
|
void | setMaxMergeMB (double mb) |
| Determines the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments. Small values (eg., 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.
|
|
double | getMaxMergeMB () |
| Returns the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments.
|
|
void | setMinMergeMB (double mb) |
| 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).
|
|
double | getMinMergeMB () |
| Get the minimum size for a segment to remain un-merged.
|
|
| LogMergePolicy (const IndexWriterPtr &writer) |
|
virtual | ~LogMergePolicy () |
|
boost::shared_ptr< LogMergePolicy > | shared_from_this () |
|
double | getNoCFSRatio () |
|
void | setNoCFSRatio (double noCFSRatio) |
| If a merged segment will be more than this percentage of the total size of the index, leave the segment as non-compound file even if compound file is enabled. Set to 1.0 to always use CFS regardless of merge size.
|
|
int32_t | getMergeFactor () |
| Returns the number of segments that are merged at once and also controls the total number of segments allowed to accumulate in the index.
|
|
void | setMergeFactor (int32_t mergeFactor) |
| 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.
|
|
virtual bool | useCompoundFile (const SegmentInfosPtr &segments, const SegmentInfoPtr &newSegment) |
| Returns true if a newly flushed (not from merge) segment should use the compound file format.
|
|
void | setUseCompoundFile (bool useCompoundFile) |
| Sets whether compound file format should be used for newly flushed and newly merged segments.
|
|
bool | getUseCompoundFile () |
| Returns true if newly flushed and newly merge segments are written in compound file format.
|
|
virtual bool | useCompoundDocStore (const SegmentInfosPtr &segments) |
| Returns true if the doc store files should use the compound file format.
|
|
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).
|
|
bool | getUseCompoundDocStore () |
| Returns true if newly flushed and newly merge doc store segment files (term vectors and stored fields) are written in compound file format.
|
|
void | setCalibrateSizeByDeletes (bool calibrateSizeByDeletes) |
| Sets whether the segment size should be calibrated by the number of deletes when choosing segments for merge.
|
|
bool | getCalibrateSizeByDeletes () |
| Returns true if the segment size should be calibrated by the number of deletes when choosing segments for merge.
|
|
virtual void | close () |
| Release all resources for the policy.
|
|
virtual MergeSpecificationPtr | findMergesForOptimize (const SegmentInfosPtr &segmentInfos, int32_t maxSegmentCount, SetSegmentInfo 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.
|
|
virtual MergeSpecificationPtr | findMergesToExpungeDeletes (const SegmentInfosPtr &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.
|
|
virtual MergeSpecificationPtr | findMerges (const SegmentInfosPtr &segmentInfos) |
| Checks if any merges are now necessary and returns a MergePolicy.MergeSpecification if so. A merge is necessary when there are more than setMergeFactor segments at a given level. When multiple levels have too many segments, this method will return multiple merges, allowing the MergeScheduler to use concurrency.
|
|
void | setMaxMergeDocs (int32_t maxMergeDocs) |
| Determines the largest segment (measured by document count) that may be merged with other segments. Small values (eg., 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.
|
|
int32_t | getMaxMergeDocs () |
| Returns the largest segment (measured by document count) that may be merged with other segments.
|
|
| MergePolicy (const IndexWriterPtr &writer) |
|
virtual | ~MergePolicy () |
|
boost::shared_ptr< MergePolicy > | shared_from_this () |
|
virtual | ~LuceneObject () |
|
virtual void | initialize () |
| Called directly after instantiation to create objects that depend on this object being fully constructed.
|
|
virtual LuceneObjectPtr | clone (const LuceneObjectPtr &other=LuceneObjectPtr()) |
| Return clone of this object.
|
|
virtual int32_t | hashCode () |
| Return hash code for this object.
|
|
virtual bool | equals (const LuceneObjectPtr &other) |
| Return whether two objects are equal.
|
|
virtual int32_t | compareTo (const LuceneObjectPtr &other) |
| Compare two objects.
|
|
virtual String | toString () |
| Returns a string representation of the object.
|
|
virtual | ~LuceneSync () |
|
virtual SynchronizePtr | getSync () |
| Return this object synchronize lock.
|
|
virtual LuceneSignalPtr | getSignal () |
| Return this object signal.
|
|
virtual void | lock (int32_t timeout=0) |
| Lock this object using an optional timeout.
|
|
virtual void | unlock () |
| Unlock this object.
|
|
virtual bool | holdsLock () |
| Returns true if this object is currently locked by current thread.
|
|
virtual void | wait (int32_t timeout=0) |
| Wait for signal using an optional timeout.
|
|
virtual void | notifyAll () |
| Notify all threads waiting for signal.
|
|
This is a LogMergePolicy
that measures size of a segment as the total byte size of the segment's files.