CLucene - a full-featured, c++ search engine
API Documentation
#include <FieldInfos.h>

Public Types | |
| enum | { IS_INDEXED = 0x1, STORE_TERMVECTOR = 0x2, STORE_POSITIONS_WITH_TERMVECTOR = 0x4, STORE_OFFSET_WITH_TERMVECTOR = 0x8, OMIT_NORMS = 0x10 } |
Public Member Functions | |
| FieldInfos () | |
| ~FieldInfos () | |
| FieldInfos (lucene::store::Directory *d, const char *name) | |
| Construct a FieldInfos object using the directory and the name of the file IndexInput. | |
| int32_t | fieldNumber (const TCHAR *fieldName) const |
| FieldInfo * | fieldInfo (const TCHAR *fieldName) const |
| Return the fieldinfo object referenced by the fieldNumber. | |
| const TCHAR * | fieldName (const int32_t fieldNumber) const |
| Return the fieldName identified by its number. | |
| FieldInfo * | fieldInfo (const int32_t fieldNumber) const |
| int32_t | size () const |
| bool | hasVectors () const |
| void | add (const lucene::document::Document *doc) |
| void | add (FieldInfos *other) |
| void | add (const TCHAR *name, const bool isIndexed, const bool storeTermVector=false, bool storePositionWithTermVector=false, bool storeOffsetWithTermVector=false, bool omitNorms=false) |
| If the field is not yet known, adds it. | |
| void | add (const TCHAR **names, const bool isIndexed, const bool storeTermVector=false, bool storePositionWithTermVector=false, bool storeOffsetWithTermVector=false, bool omitNorms=false) |
| Assumes the fields are not storing term vectors. | |
| void | write (lucene::store::Directory *d, const char *name) const |
| void | write (lucene::store::IndexOutput *output) const |
Each segment has a separate Field Info file. Objects of this class are thread-safe for multiple readers, but only one thread can be adding documents at a time, with no other reader or writer threads accessing this object.
| anonymous enum |
| lucene::index::FieldInfos::FieldInfos | ( | ) |
| lucene::index::FieldInfos::~FieldInfos | ( | ) |
| lucene::index::FieldInfos::FieldInfos | ( | lucene::store::Directory * | d, | |
| const char * | name | |||
| ) |
Construct a FieldInfos object using the directory and the name of the file IndexInput.
| d | The directory to open the IndexInput from | |
| name | The name of the file to open the IndexInput from in the Directory |
| IOException |
| void lucene::index::FieldInfos::add | ( | const TCHAR ** | names, | |
| const bool | isIndexed, | |||
| const bool | storeTermVector = false, |
|||
| bool | storePositionWithTermVector = false, |
|||
| bool | storeOffsetWithTermVector = false, |
|||
| bool | omitNorms = false | |||
| ) |
Assumes the fields are not storing term vectors.
| names | The names of the fields | |
| isIndexed | true if the field is indexed | |
| storeTermVector | true if the term vector should be stored |
| void lucene::index::FieldInfos::add | ( | const TCHAR * | name, | |
| const bool | isIndexed, | |||
| const bool | storeTermVector = false, |
|||
| bool | storePositionWithTermVector = false, |
|||
| bool | storeOffsetWithTermVector = false, |
|||
| bool | omitNorms = false | |||
| ) |
If the field is not yet known, adds it.
If it is known, checks to make sure that the isIndexed flag is the same as was given previously for this field. If not - marks it as being indexed. Same goes for the TermVector parameters.
| name | The name of the field | |
| isIndexed | true if the field is indexed | |
| storeTermVector | true if the term vector should be stored | |
| storePositionWithTermVector | true if the term vector with positions should be stored | |
| storeOffsetWithTermVector | true if the term vector with offsets should be stored |
| void lucene::index::FieldInfos::add | ( | FieldInfos * | other | ) |
| void lucene::index::FieldInfos::add | ( | const lucene::document::Document * | doc | ) |
| FieldInfo* lucene::index::FieldInfos::fieldInfo | ( | const int32_t | fieldNumber | ) | const |
| FieldInfo* lucene::index::FieldInfos::fieldInfo | ( | const TCHAR * | fieldName | ) | const |
Return the fieldinfo object referenced by the fieldNumber.
| fieldNumber |
| const TCHAR* lucene::index::FieldInfos::fieldName | ( | const int32_t | fieldNumber | ) | const |
Return the fieldName identified by its number.
| fieldNumber |
| int32_t lucene::index::FieldInfos::fieldNumber | ( | const TCHAR * | fieldName | ) | const |
| bool lucene::index::FieldInfos::hasVectors | ( | ) | const |
| int32_t lucene::index::FieldInfos::size | ( | ) | const |
| void lucene::index::FieldInfos::write | ( | lucene::store::IndexOutput * | output | ) | const |
| void lucene::index::FieldInfos::write | ( | lucene::store::Directory * | d, | |
| const char * | name | |||
| ) | const |