This stores a monotonically increasing set of <Term, TermInfo> pairs in a Directory. A TermInfos can be written once, in order.
More...
#include <TermInfosWriter.h>
|
| TermInfosWriter (const DirectoryPtr &directory, const String &segment, const FieldInfosPtr &fis, int32_t interval) |
|
| TermInfosWriter (const DirectoryPtr &directory, const String &segment, const FieldInfosPtr &fis, int32_t interval, bool isIndex) |
|
virtual | ~TermInfosWriter () |
|
virtual String | getClassName () |
|
boost::shared_ptr< TermInfosWriter > | shared_from_this () |
|
virtual void | initialize () |
| Called directly after instantiation to create objects that depend on this object being fully constructed.
|
|
void | add (const TermPtr &term, const TermInfoPtr &ti) |
|
void | add (int32_t fieldNumber, ByteArray termBytes, int32_t termBytesLength, const TermInfoPtr &ti) |
| Adds a new <<fieldNumber, termBytes>, TermInfo> pair to the set. Term must be lexicographically greater than all previous Terms added. TermInfo pointers must be positive and greater than all previous.
|
|
void | close () |
| Called to complete TermInfos creation.
|
|
virtual | ~LuceneObject () |
|
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.
|
|
|
int32_t | indexInterval |
| The fraction of terms in the "dictionary" which should be stored in RAM. Smaller values use more memory, but make searching slightly faster, while larger values use less memory and make searching slightly slower. Searching is typically not dominated by dictionary lookup, so tweaking this is rarely useful.
|
|
int32_t | skipInterval |
| The fraction of TermDocs entries stored in skip tables, used to accelerate TermDocs#skipTo(int) . Larger values result in smaller indexes, greater acceleration, but fewer accelerable cases, while smaller values result in bigger indexes, less acceleration and more accelerable cases. More detailed experiments would be useful here.
|
|
int32_t | maxSkipLevels |
| The maximum number of skip levels. Smaller values result in slightly smaller indexes, but slower skipping in big posting lists.
|
|
|
static const int32_t | FORMAT |
| The file format version, a negative number.
|
|
static const int32_t | FORMAT_VERSION_UTF8_LENGTH_IN_BYTES |
| Changed strings to true utf8 with length-in-bytes not length-in-chars.
|
|
static const int32_t | FORMAT_CURRENT |
| NOTE: always change this if you switch to a new format.
|
|
This stores a monotonically increasing set of <Term, TermInfo> pairs in a Directory. A TermInfos can be written once, in order.
◆ TermInfosWriter() [1/2]
Lucene::TermInfosWriter::TermInfosWriter |
( |
const DirectoryPtr & |
directory, |
|
|
const String & |
segment, |
|
|
const FieldInfosPtr & |
fis, |
|
|
int32_t |
interval |
|
) |
| |
◆ TermInfosWriter() [2/2]
Lucene::TermInfosWriter::TermInfosWriter |
( |
const DirectoryPtr & |
directory, |
|
|
const String & |
segment, |
|
|
const FieldInfosPtr & |
fis, |
|
|
int32_t |
interval, |
|
|
bool |
isIndex |
|
) |
| |
◆ ~TermInfosWriter()
virtual Lucene::TermInfosWriter::~TermInfosWriter |
( |
| ) |
|
|
virtual |
◆ _getClassName()
static String Lucene::TermInfosWriter::_getClassName |
( |
| ) |
|
|
inlinestatic |
◆ add() [1/2]
◆ add() [2/2]
void Lucene::TermInfosWriter::add |
( |
int32_t |
fieldNumber, |
|
|
ByteArray |
termBytes, |
|
|
int32_t |
termBytesLength, |
|
|
const TermInfoPtr & |
ti |
|
) |
| |
Adds a new <<fieldNumber, termBytes>, TermInfo> pair to the set. Term must be lexicographically greater than all previous Terms added. TermInfo pointers must be positive and greater than all previous.
◆ close()
void Lucene::TermInfosWriter::close |
( |
| ) |
|
Called to complete TermInfos creation.
◆ compareToLastTerm()
int32_t Lucene::TermInfosWriter::compareToLastTerm |
( |
int32_t |
fieldNumber, |
|
|
ByteArray |
termBytes, |
|
|
int32_t |
termBytesLength |
|
) |
| |
|
protected |
Currently used only by assert statement.
◆ getClassName()
virtual String Lucene::TermInfosWriter::getClassName |
( |
| ) |
|
|
inlinevirtual |
◆ initialize() [1/2]
virtual void Lucene::TermInfosWriter::initialize |
( |
| ) |
|
|
virtual |
Called directly after instantiation to create objects that depend on this object being fully constructed.
Reimplemented from Lucene::LuceneObject.
◆ initialize() [2/2]
void Lucene::TermInfosWriter::initialize |
( |
const DirectoryPtr & |
directory, |
|
|
const String & |
segment, |
|
|
const FieldInfosPtr & |
fis, |
|
|
int32_t |
interval, |
|
|
bool |
isi |
|
) |
| |
|
protected |
◆ initUnicodeResults()
bool Lucene::TermInfosWriter::initUnicodeResults |
( |
| ) |
|
|
protected |
Currently used only by assert statements.
◆ shared_from_this()
boost::shared_ptr< TermInfosWriter > Lucene::TermInfosWriter::shared_from_this |
( |
| ) |
|
|
inline |
◆ writeTerm()
void Lucene::TermInfosWriter::writeTerm |
( |
int32_t |
fieldNumber, |
|
|
ByteArray |
termBytes, |
|
|
int32_t |
termBytesLength |
|
) |
| |
|
protected |
◆ _other
◆ fieldInfos
◆ FORMAT
const int32_t Lucene::TermInfosWriter::FORMAT |
|
static |
The file format version, a negative number.
◆ FORMAT_CURRENT
const int32_t Lucene::TermInfosWriter::FORMAT_CURRENT |
|
static |
NOTE: always change this if you switch to a new format.
◆ FORMAT_VERSION_UTF8_LENGTH_IN_BYTES
const int32_t Lucene::TermInfosWriter::FORMAT_VERSION_UTF8_LENGTH_IN_BYTES |
|
static |
Changed strings to true utf8 with length-in-bytes not length-in-chars.
◆ indexInterval
int32_t Lucene::TermInfosWriter::indexInterval |
The fraction of terms in the "dictionary" which should be stored in RAM. Smaller values use more memory, but make searching slightly faster, while larger values use less memory and make searching slightly slower. Searching is typically not dominated by dictionary lookup, so tweaking this is rarely useful.
◆ isIndex
bool Lucene::TermInfosWriter::isIndex |
|
protected |
◆ lastFieldNumber
int32_t Lucene::TermInfosWriter::lastFieldNumber |
|
protected |
◆ lastIndexPointer
int64_t Lucene::TermInfosWriter::lastIndexPointer |
|
protected |
◆ lastTermBytes
ByteArray Lucene::TermInfosWriter::lastTermBytes |
|
protected |
◆ lastTermBytesLength
int32_t Lucene::TermInfosWriter::lastTermBytesLength |
|
protected |
◆ lastTi
◆ maxSkipLevels
int32_t Lucene::TermInfosWriter::maxSkipLevels |
The maximum number of skip levels. Smaller values result in slightly smaller indexes, but slower skipping in big posting lists.
◆ otherWriter
◆ output
◆ size
int64_t Lucene::TermInfosWriter::size |
|
protected |
◆ skipInterval
int32_t Lucene::TermInfosWriter::skipInterval |
The fraction of TermDocs
entries stored in skip tables, used to accelerate TermDocs#skipTo(int)
. Larger values result in smaller indexes, greater acceleration, but fewer accelerable cases, while smaller values result in bigger indexes, less acceleration and more accelerable cases. More detailed experiments would be useful here.
◆ unicodeResult1
◆ unicodeResult2
◆ utf8Result
The documentation for this class was generated from the following file: