public abstract class DocsAndPositionsEnum extends DocsEnum
| Modifier and Type | Field and Description |
|---|---|
static int |
FLAG_OFFSETS
Flag to pass to
TermsEnum.docsAndPositions(Bits,DocsAndPositionsEnum,int)
if you require offsets in the returned enum. |
static int |
FLAG_PAYLOADS
Flag to pass to
TermsEnum.docsAndPositions(Bits,DocsAndPositionsEnum,int)
if you require payloads in the returned enum. |
FLAG_FREQSNO_MORE_DOCS| Modifier | Constructor and Description |
|---|---|
protected |
DocsAndPositionsEnum()
Sole constructor.
|
| Modifier and Type | Method and Description |
|---|---|
abstract int |
endOffset()
Returns end offset for the current position, or -1 if
offsets were not indexed.
|
abstract BytesRef |
getPayload()
Returns the payload at this position, or null if no
payload was indexed.
|
abstract int |
nextPosition()
Returns the next position.
|
abstract int |
startOffset()
Returns start offset for the current position, or -1
if offsets were not indexed.
|
attributes, freqadvance, docID, nextDocpublic static final int FLAG_OFFSETS
TermsEnum.docsAndPositions(Bits,DocsAndPositionsEnum,int)
if you require offsets in the returned enum.public static final int FLAG_PAYLOADS
TermsEnum.docsAndPositions(Bits,DocsAndPositionsEnum,int)
if you require payloads in the returned enum.protected DocsAndPositionsEnum()
public abstract int nextPosition()
throws IOException
DocsEnum.freq() times else
the behavior is not defined. If positions were not
indexed this will return -1; this only happens if
offsets were indexed and you passed needsOffset=true
when pulling the enum.IOExceptionpublic abstract int startOffset()
throws IOException
IOExceptionpublic abstract int endOffset()
throws IOException
IOExceptionpublic abstract BytesRef getPayload() throws IOException
IOExceptionCopyright © 2000-2012 Apache Software Foundation. All Rights Reserved.