Lucene++ - a full-featured, c++ search engine
API Documentation
Represents a single commit into an index as seen by the IndexDeletionPolicy
or IndexReader
.
More...
#include <IndexCommit.h>
Public Member Functions | |
virtual | ~IndexCommit () |
virtual String | getClassName () |
boost::shared_ptr< IndexCommit > | shared_from_this () |
virtual String | getSegmentsFileName ()=0 |
Get the segments file (segments_N) associated with this commit point. | |
virtual HashSet< String > | getFileNames ()=0 |
Returns all index files referenced by this commit point. | |
virtual DirectoryPtr | getDirectory ()=0 |
Returns the Directory for the index. | |
virtual void | deleteCommit ()=0 |
Delete this commit point. This only applies when using the commit point in the context of IndexWriter's IndexDeletionPolicy. | |
virtual bool | isDeleted ()=0 |
virtual bool | isOptimized ()=0 |
Returns true if this commit is an optimized index. | |
virtual bool | equals (const LuceneObjectPtr &other) |
Two IndexCommits are equal if both their Directory and versions are equal. | |
virtual int32_t | hashCode () |
Return hash code for this object. | |
virtual int64_t | getVersion ()=0 |
Returns the version for this IndexCommit. This is the same value that IndexReader#getVersion would return if it were opened on this commit. | |
virtual int64_t | getGeneration ()=0 |
Returns the generation (the _N in segments_N) for this IndexCommit. | |
virtual int64_t | getTimestamp () |
Convenience method that returns the last modified time of the segments_N file corresponding to this index commit, equivalent to getDirectory()->fileModified(getSegmentsFileName()). | |
virtual MapStringString | getUserData ()=0 |
Returns userData, previously passed to IndexWriter#commit(Map) for this commit. Map is String -> String. | |
![]() | |
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 | 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. | |
Static Public Member Functions | |
static String | _getClassName () |
Additional Inherited Members | |
![]() | |
LuceneObject () | |
![]() | |
SynchronizePtr | objectLock |
LuceneSignalPtr | objectSignal |
Represents a single commit into an index as seen by the IndexDeletionPolicy
or IndexReader
.
Changes to the content of an index are made visible only after the writer who made that change commits by writing a new segments file (segments_N). This point in time, when the action of writing of a new segments file to the directory is completed, is an index commit.
Each index commit point has a unique segments file associated with it. The segments file associated with a later index commit point would have a larger N.
|
virtual |
|
inlinestatic |
|
pure virtual |
Delete this commit point. This only applies when using the commit point in the context of IndexWriter's IndexDeletionPolicy.
Upon calling this, the writer is notified that this commit point should be deleted.
Decision that a commit-point should be deleted is taken by the IndexDeletionPolicy
in effect and therefore this should only be called by its onInit()
or onCommit()
methods.
Implemented in Lucene::ReaderCommit, and Lucene::CommitPoint.
|
virtual |
Two IndexCommits are equal if both their Directory and versions are equal.
Reimplemented from Lucene::LuceneObject.
|
inlinevirtual |
Reimplemented in Lucene::ReaderCommit, and Lucene::CommitPoint.
|
pure virtual |
Returns the Directory
for the index.
Implemented in Lucene::ReaderCommit, and Lucene::CommitPoint.
|
pure virtual |
Returns all index files referenced by this commit point.
Implemented in Lucene::ReaderCommit, and Lucene::CommitPoint.
|
pure virtual |
Returns the generation (the _N in segments_N) for this IndexCommit.
Implemented in Lucene::ReaderCommit, and Lucene::CommitPoint.
|
pure virtual |
Get the segments file (segments_N) associated with this commit point.
Implemented in Lucene::ReaderCommit, and Lucene::CommitPoint.
|
virtual |
Convenience method that returns the last modified time of the segments_N file corresponding to this index commit, equivalent to getDirectory()->fileModified(getSegmentsFileName()).
|
pure virtual |
Returns userData, previously passed to IndexWriter#commit(Map)
for this commit. Map is String -> String.
Implemented in Lucene::ReaderCommit, and Lucene::CommitPoint.
|
pure virtual |
Returns the version for this IndexCommit. This is the same value that IndexReader#getVersion
would return if it were opened on this commit.
Implemented in Lucene::ReaderCommit, and Lucene::CommitPoint.
|
virtual |
Return hash code for this object.
Reimplemented from Lucene::LuceneObject.
|
pure virtual |
Implemented in Lucene::ReaderCommit, and Lucene::CommitPoint.
|
pure virtual |
Returns true if this commit is an optimized index.
Implemented in Lucene::ReaderCommit, and Lucene::CommitPoint.
|
inline |