public class XtfChunkedWordIter extends ChunkedWordIter
chunk, chunkSource
maxWordPos, text, tokens, tokNum, wordPos
FIELD_END, FIELD_START, TERM_END, TERM_END_PLUS, TERM_START
Constructor and Description |
---|
XtfChunkedWordIter(IndexReader reader,
DocNumMap docNumMap,
int mainDocNum,
String field,
Analyzer analyzer)
Construct the iterator and read in starting text from the given
chunk.
|
Modifier and Type | Method and Description |
---|---|
MarkPos |
getPos(int startOrEnd)
Create an uninitialized MarkPos structure
|
void |
getPos(MarkPos pos,
int startOrEnd)
Get the position of the start of the current word
|
createPos, next, prev, reseek, reseek, seekFirst, seekLast
clone, term
public XtfChunkedWordIter(IndexReader reader, DocNumMap docNumMap, int mainDocNum, String field, Analyzer analyzer)
reader
- where to read chunks fromdocNumMap
- maps main doc num to chunk numbersmainDocNum
- doc ID of the main documentfield
- field tokenize and iterateanalyzer
- used to tokenize the fieldpublic MarkPos getPos(int startOrEnd)
getPos
in interface WordIter
getPos
in class BasicWordIter
startOrEnd
- FIELD_START for the very start of the field;
TERM_START for the first character of the word;
TERM_END for the last character of the word;
TERM_END_PLUS for the last character plus any trailing
punctuation and/or spaces;
FIELD_END for the very last end of the field.public void getPos(MarkPos pos, int startOrEnd)
getPos
in interface WordIter
getPos
in class ChunkedWordIter
startOrEnd
- FIELD_START for the very start of the field;
TERM_START for the first character of the word;
TERM_END for the last character of the word;
TERM_END_PLUS for the last character plus any trailing
punctuation and/or spaces;
FIELD_END for the very last end of the field.