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

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

This stores a monotonically increasing set of <Term, TermInfo> pairs in a Directory. Pairs are accessed either by Term or by ordinal position the set. More...

`#include <TermInfosReader.h>`

Inheritance diagram for Lucene::TermInfosReader:

## Public Member Functions

| TermInfosReader (const DirectoryPtr &dir, const String &seg, const FieldInfosPtr &fis, int32_t readBufferSize, int32_t indexDivisor)
virtual | ~TermInfosReader ()
virtual String | getClassName ()
boost::shared_ptr< TermInfosReader > | shared_from_this ()
int32_t | getSkipInterval ()
int32_t | getMaxSkipLevels ()
void | close ()
int64_t | size ()
| Returns the number of term/value pairs in the set.
TermInfoPtr | get (const TermPtr &term)
| Returns the TermInfo for a Term in the set, or null.
int64_t | getPosition (const TermPtr &term)
| Returns the position of a Term in the set or -1.
SegmentTermEnumPtr | terms ()
| Returns an enumeration of all the Terms and TermInfos in the set.
SegmentTermEnumPtr | terms (const TermPtr &term)
| Returns an enumeration of terms starting at or after the named term.
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 | 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.
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 ()

## Protected Member Functions

TermInfosReaderThreadResourcesPtr | getThreadResources ()
int32_t | getIndexOffset (const TermPtr &term)
| Returns the offset of the greatest index entry which is less than or equal to term.
void | seekEnum (const SegmentTermEnumPtr &enumerator, int32_t indexOffset)
TermInfoPtr | get (const TermPtr &term, bool useCache)
| Returns the TermInfo for a Term in the set, or null.
void | ensureIndexIsRead ()
Protected Member Functions inherited from Lucene::LuceneObject
| LuceneObject ()

## Protected Attributes

DirectoryPtr | directory
String | segment
FieldInfosPtr | fieldInfos
CloseableThreadLocal< TermInfosReaderThreadResources > | threadResources
SegmentTermEnumPtr | origEnum
int64_t | _size
Collection< TermPtr > | indexTerms
Collection< TermInfoPtr > | indexInfos
Collection< int64_t > | indexPointers
int32_t | totalIndexInterval
Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr | objectLock
LuceneSignalPtr | objectSignal

## Static Protected Attributes

static const int32_t | DEFAULT_CACHE_SIZE

## Detailed Description

This stores a monotonically increasing set of <Term, TermInfo> pairs in a Directory. Pairs are accessed either by Term or by ordinal position the set.

## Constructor & Destructor Documentation

## ◆ TermInfosReader()

Lucene::TermInfosReader::TermInfosReader | ( | const DirectoryPtr & | dir,
|  | const String & | seg,
|  | const FieldInfosPtr & | fis,
|  | int32_t | readBufferSize,
|  | int32_t | indexDivisor
| ) |  |

## ◆ ~TermInfosReader()

virtual Lucene::TermInfosReader::~TermInfosReader | ( |  | ) |

virtual

## Member Function Documentation

## ◆ _getClassName()

static String Lucene::TermInfosReader::_getClassName | ( |  | ) |

inline static

## ◆ close()

void Lucene::TermInfosReader::close | ( |  | ) |

## ◆ ensureIndexIsRead()

void Lucene::TermInfosReader::ensureIndexIsRead | ( |  | ) |

protected

## ◆ get() [1/2]

TermInfoPtr Lucene::TermInfosReader::get | ( | const TermPtr & | term | ) |

Returns the TermInfo for a Term in the set, or null.

## ◆ get() [2/2]

TermInfoPtr Lucene::TermInfosReader::get | ( | const TermPtr & | term,
|  | bool | useCache
| ) |  |

protected

Returns the TermInfo for a Term in the set, or null.

## ◆ getClassName()

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

inline virtual

## ◆ getIndexOffset()

int32_t Lucene::TermInfosReader::getIndexOffset | ( | const TermPtr & | term | ) |

protected

Returns the offset of the greatest index entry which is less than or equal to term.

## ◆ getMaxSkipLevels()

int32_t Lucene::TermInfosReader::getMaxSkipLevels | ( |  | ) |

## ◆ getPosition()

int64_t Lucene::TermInfosReader::getPosition | ( | const TermPtr & | term | ) |

Returns the position of a Term in the set or -1.

## ◆ getSkipInterval()

int32_t Lucene::TermInfosReader::getSkipInterval | ( |  | ) |

## ◆ getThreadResources()

TermInfosReaderThreadResourcesPtr Lucene::TermInfosReader::getThreadResources | ( |  | ) |

protected

## ◆ seekEnum()

void Lucene::TermInfosReader::seekEnum | ( | const SegmentTermEnumPtr & | enumerator,
|  | int32_t | indexOffset
| ) |  |

protected

## ◆ shared_from_this()

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

inline

## ◆ size()

int64_t Lucene::TermInfosReader::size | ( |  | ) |

Returns the number of term/value pairs in the set.

## ◆ terms() [1/2]

SegmentTermEnumPtr Lucene::TermInfosReader::terms | ( |  | ) |

Returns an enumeration of all the Terms and TermInfos in the set.

## ◆ terms() [2/2]

SegmentTermEnumPtr Lucene::TermInfosReader::terms | ( | const TermPtr & | term | ) |

Returns an enumeration of terms starting at or after the named term.

## Field Documentation

## ◆ _size

int64_t Lucene::TermInfosReader::_size

protected

## ◆ DEFAULT_CACHE_SIZE

const int32_t Lucene::TermInfosReader::DEFAULT_CACHE_SIZE

static protected

## ◆ directory

DirectoryPtr Lucene::TermInfosReader::directory

protected

## ◆ fieldInfos

FieldInfosPtr Lucene::TermInfosReader::fieldInfos

protected

## ◆ indexInfos

Collection<TermInfoPtr> Lucene::TermInfosReader::indexInfos

protected

## ◆ indexPointers

Collection<int64_t> Lucene::TermInfosReader::indexPointers

protected

## ◆ indexTerms

Collection<TermPtr> Lucene::TermInfosReader::indexTerms

protected

## ◆ origEnum

SegmentTermEnumPtr Lucene::TermInfosReader::origEnum

protected

## ◆ segment

String Lucene::TermInfosReader::segment

protected

## ◆ threadResources

CloseableThreadLocal<TermInfosReaderThreadResources> Lucene::TermInfosReader::threadResources

protected

## ◆ totalIndexInterval

int32_t Lucene::TermInfosReader::totalIndexInterval

protected

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

- TermInfosReader.h

clucene.sourceforge.net