Lucene++ - a full-featured, c++ search engine
API Documentation

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Attributes
Lucene::ReaderCommit Class Reference

`#include <DirectoryReader.h>`

Inheritance diagram for Lucene::ReaderCommit:

## Public Member Functions

| ReaderCommit (const SegmentInfosPtr &infos, const DirectoryPtr &dir)
virtual | ~ReaderCommit ()
virtual String | getClassName ()
boost::shared_ptr< ReaderCommit > | shared_from_this ()
virtual String | toString ()
| Returns a string representation of the object.
virtual bool | isOptimized ()
| Returns true if this commit is an optimized index.
virtual String | getSegmentsFileName ()
| Two IndexCommits are equal if both their Directory and versions are equal.
virtual HashSet< String > | getFileNames ()
| Returns all index files referenced by this commit point.
virtual DirectoryPtr | getDirectory ()
| Returns the `Directory` for the index.
virtual int64_t | getVersion ()
| Returns the version for this IndexCommit.
virtual int64_t | getGeneration ()
| Returns the generation (the _N in segments_N) for this IndexCommit.
virtual bool | isDeleted ()
virtual MapStringString | getUserData ()
| Returns userData, previously passed to `IndexWriter#commit(Map)` for this commit.
virtual void | deleteCommit ()
| Delete this commit point. This only applies when using the commit point in the context of IndexWriter's IndexDeletionPolicy.
Public Member Functions inherited from Lucene::IndexCommit
virtual | ~IndexCommit ()
boost::shared_ptr< IndexCommit > | shared_from_this ()
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 | getTimestamp ()
| Convenience method that returns the last modified time of the segments_N file corresponding to this index commit, equivalent to getDirectory()->fileModified(getSegmentsFileName()).
Public Member Functions inherited from Lucene::LuceneObject
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.
Public Member Functions inherited from Lucene::LuceneSync
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 ()
Static Public Member Functions inherited from Lucene::IndexCommit
static String | _getClassName ()

## Protected Attributes

String | segmentsFileName
HashSet< String > | files
DirectoryPtr | dir
int64_t | generation
int64_t | version
bool | _isOptimized
MapStringString | userData
Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr | objectLock
LuceneSignalPtr | objectSignal

## Additional Inherited Members

Protected Member Functions inherited from Lucene::LuceneObject
| LuceneObject ()

## Constructor & Destructor Documentation

## ◆ ReaderCommit()

Lucene::ReaderCommit::ReaderCommit | ( | const SegmentInfosPtr & | infos,
|  | const DirectoryPtr & | dir )

References dir.

Referenced by _getClassName().

## ◆ ~ReaderCommit()

virtual Lucene::ReaderCommit::~ReaderCommit | ( |  | ) |

virtual

## Member Function Documentation

## ◆ _getClassName()

String Lucene::ReaderCommit::_getClassName | ( |  | ) |

inline static

References ReaderCommit().

## ◆ deleteCommit()

virtual void Lucene::ReaderCommit::deleteCommit | ( |  | ) |

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.

Implements Lucene::IndexCommit.

## ◆ getClassName()

virtual String Lucene::ReaderCommit::getClassName | ( |  | ) |

inline virtual

Reimplemented from Lucene::IndexCommit.

## ◆ getDirectory()

virtual DirectoryPtr Lucene::ReaderCommit::getDirectory | ( |  | ) |

virtual

Returns the `Directory` for the index.

Implements Lucene::IndexCommit.

## ◆ getFileNames()

virtual HashSet< String > Lucene::ReaderCommit::getFileNames | ( |  | ) |

virtual

Returns all index files referenced by this commit point.

Implements Lucene::IndexCommit.

## ◆ getGeneration()

virtual int64_t Lucene::ReaderCommit::getGeneration | ( |  | ) |

virtual

Returns the generation (the _N in segments_N) for this IndexCommit.

Implements Lucene::IndexCommit.

## ◆ getSegmentsFileName()

virtual String Lucene::ReaderCommit::getSegmentsFileName | ( |  | ) |

virtual

Two IndexCommits are equal if both their Directory and versions are equal.

Implements Lucene::IndexCommit.

## ◆ getUserData()

virtual MapStringString Lucene::ReaderCommit::getUserData | ( |  | ) |

virtual

Returns userData, previously passed to `IndexWriter#commit(Map)` for this commit.

Implements Lucene::IndexCommit.

## ◆ getVersion()

virtual int64_t Lucene::ReaderCommit::getVersion | ( |  | ) |

virtual

Returns the version for this IndexCommit.

Implements Lucene::IndexCommit.

## ◆ isDeleted()

virtual bool Lucene::ReaderCommit::isDeleted | ( |  | ) |

virtual

Implements Lucene::IndexCommit.

## ◆ isOptimized()

virtual bool Lucene::ReaderCommit::isOptimized | ( |  | ) |

virtual

Returns true if this commit is an optimized index.

Implements Lucene::IndexCommit.

## ◆ shared_from_this()

boost::shared_ptr< ReaderCommit > Lucene::ReaderCommit::shared_from_this | ( |  | ) |

inline

## ◆ toString()

virtual String Lucene::ReaderCommit::toString | ( |  | ) |

virtual

Returns a string representation of the object.

Reimplemented from Lucene::LuceneObject.

## Field Documentation

## ◆ _isOptimized

bool Lucene::ReaderCommit::_isOptimized

protected

## ◆ dir

DirectoryPtr Lucene::ReaderCommit::dir

protected

Referenced by ReaderCommit().

## ◆ files

HashSet<String> Lucene::ReaderCommit::files

protected

## ◆ generation

int64_t Lucene::ReaderCommit::generation

protected

## ◆ segmentsFileName

String Lucene::ReaderCommit::segmentsFileName

protected

## ◆ userData

MapStringString Lucene::ReaderCommit::userData

protected

## ◆ version

int64_t Lucene::ReaderCommit::version

protected

The documentation for this class was generated from the following file:

- DirectoryReader.h

clucene.sourceforge.net