lucene::index::FieldInfos Class Reference
Access to the Field Info file that describes document fields and whether or not they are indexed.
More...
#include <FieldInfos.h>
List of all members.
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 |
Detailed Description
Access to the Field Info file that describes document fields and whether or not they are indexed.
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.
Member Enumeration Documentation
- Enumerator:
| IS_INDEXED |
|
| STORE_TERMVECTOR |
|
| STORE_POSITIONS_WITH_TERMVECTOR |
|
| STORE_OFFSET_WITH_TERMVECTOR |
|
| OMIT_NORMS |
|
Constructor & Destructor Documentation
| lucene::index::FieldInfos::FieldInfos |
( |
|
) |
|
| lucene::index::FieldInfos::~FieldInfos |
( |
|
) |
|
Construct a FieldInfos object using the directory and the name of the file IndexInput.
- Parameters:
-
| d | The directory to open the IndexInput from |
| name | The name of the file to open the IndexInput from in the Directory |
- Exceptions:
-
- See also:
- read
Member Function Documentation
| 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.
- Parameters:
-
| names | The names of the fields |
| isIndexed | true if the field is indexed |
| storeTermVector | true if the term vector should be stored |
- See also:
- add(String, boolean)
| 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.
- 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 |
) |
|
| 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.
- Parameters:
-
- Returns:
- the FieldInfo object or null when the given fieldNumber doesn't exist.
| const TCHAR* lucene::index::FieldInfos::fieldName |
( |
const int32_t |
fieldNumber |
) |
const |
Return the fieldName identified by its number.
- Parameters:
-
- Returns:
- the fieldName or an empty string when the field with the given number doesn't exist.
| int32_t lucene::index::FieldInfos::fieldNumber |
( |
const TCHAR * |
fieldName |
) |
const |
| bool lucene::index::FieldInfos::hasVectors |
( |
|
) |
const |
| int32_t lucene::index::FieldInfos::size |
( |
|
) |
const |
The documentation for this class was generated from the following file: