|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.search.DocIdSetIterator
org.apache.lucene.index.DocsEnum
org.apache.lucene.index.DocsAndPositionsEnum
public abstract class DocsAndPositionsEnum
Also iterates through positions.
| Field Summary | |
|---|---|
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. |
| Fields inherited from class org.apache.lucene.index.DocsEnum |
|---|
FLAG_FREQS |
| Fields inherited from class org.apache.lucene.search.DocIdSetIterator |
|---|
NO_MORE_DOCS |
| Constructor Summary | |
|---|---|
protected |
DocsAndPositionsEnum()
Sole constructor. |
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.apache.lucene.index.DocsEnum |
|---|
attributes, freq |
| Methods inherited from class org.apache.lucene.search.DocIdSetIterator |
|---|
advance, docID, nextDoc |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public 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.
| Constructor Detail |
|---|
protected DocsAndPositionsEnum()
| Method Detail |
|---|
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.
IOException
public abstract int startOffset()
throws IOException
IOException
public abstract int endOffset()
throws IOException
IOException
public abstract BytesRef getPayload()
throws IOException
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||