lucene::index::TermVectorsWriter Class Reference
Writer works by opening a document and then opening the fields within the document and then writing out the vectors for each field.
More...
#include <TermVector.h>
List of all members.
Detailed Description
Writer works by opening a document and then opening the fields within the document and then writing out the vectors for each field.
Rough usage:
for each document { writer.openDocument(); for each field on the document { writer.openField(field); for all of the terms { writer.addTerm(...) } writer.closeField } writer.closeDocument() }
Constructor & Destructor Documentation
| lucene::index::TermVectorsWriter::~TermVectorsWriter |
( |
|
) |
|
Member Function Documentation
| void lucene::index::TermVectorsWriter::addAllDocVectors |
( |
Array< TermFreqVector * > & |
vectors |
) |
|
Add a complete document specified by all its term vectors.
If document has no term vectors, add value for tvx.
- Parameters:
-
- Exceptions:
-
| void lucene::index::TermVectorsWriter::addTerm |
( |
const TCHAR * |
termText, |
|
|
int32_t |
freq, |
|
|
Array< int32_t > * |
positions = NULL, |
|
|
Array< TermVectorOffsetInfo > * |
offsets = NULL | |
|
) |
| | |
Add term to the field's term vector.
Field must already be open. Terms should be added in increasing order of terms, one call per unique termNum. ProxPointer is a pointer into the TermPosition file (prx). Freq is the number of times this term appears in this field, in this document.
- Exceptions:
-
| IllegalStateException | if document or field is not open |
| void lucene::index::TermVectorsWriter::close |
( |
|
) |
|
| void lucene::index::TermVectorsWriter::closeDocument |
( |
|
) |
|
| void lucene::index::TermVectorsWriter::closeField |
( |
|
) |
|
Finished processing current field.
This should be followed by a call to openField before future calls to addTerm.
| bool lucene::index::TermVectorsWriter::isDocumentOpen |
( |
|
) |
const |
| bool lucene::index::TermVectorsWriter::isFieldOpen |
( |
|
) |
const |
Return true if a field is currently open.
| lucene::index::TermVectorsWriter::LUCENE_STATIC_CONSTANT |
( |
uint8_t |
, |
|
|
STORE_OFFSET_WITH_TERMVECTOR |
= 0x2 | |
|
) |
| | |
| lucene::index::TermVectorsWriter::LUCENE_STATIC_CONSTANT |
( |
uint8_t |
, |
|
|
STORE_POSITIONS_WITH_TERMVECTOR |
= 0x1 | |
|
) |
| | |
| lucene::index::TermVectorsWriter::LUCENE_STATIC_CONSTANT |
( |
int32_t |
, |
|
|
FORMAT_SIZE |
= 4 | |
|
) |
| | |
| lucene::index::TermVectorsWriter::LUCENE_STATIC_CONSTANT |
( |
int32_t |
, |
|
|
FORMAT_VERSION |
= 2 | |
|
) |
| | |
| void lucene::index::TermVectorsWriter::openDocument |
( |
|
) |
|
| void lucene::index::TermVectorsWriter::openField |
( |
const TCHAR * |
field |
) |
|
Start processing a field.
This can be followed by a number of calls to addTerm, and a final call to closeField to indicate the end of processing of this field. If a field was previously open, it is closed automatically.
Member Data Documentation
The documentation for this class was generated from the following file: