Package org.apache.lucene.tests.index
Class RandomPostingsTester.SeedPostings
- java.lang.Object
-
- org.apache.lucene.search.DocIdSetIterator
-
- org.apache.lucene.index.PostingsEnum
-
- org.apache.lucene.tests.index.RandomPostingsTester.SeedPostings
-
- Enclosing class:
- RandomPostingsTester
public static class RandomPostingsTester.SeedPostings extends PostingsEnum
Given the same random seed this always enumerates the same random postings
-
-
Field Summary
Fields Modifier and Type Field Description intdocFreqintupto-
Fields inherited from class org.apache.lucene.index.PostingsEnum
ALL, FREQS, NONE, OFFSETS, PAYLOADS, POSITIONS
-
Fields inherited from class org.apache.lucene.search.DocIdSetIterator
NO_MORE_DOCS
-
-
Constructor Summary
Constructors Constructor Description SeedPostings(long seed, int minDocFreq, int maxDocFreq, IndexOptions options, boolean allowPayloads)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intadvance(int target)longcost()intdocID()intendOffset()intfreq()BytesRefgetPayload()intnextDoc()intnextPosition()intstartOffset()-
Methods inherited from class org.apache.lucene.index.PostingsEnum
featureRequested
-
Methods inherited from class org.apache.lucene.search.DocIdSetIterator
all, empty, range, slowAdvance
-
-
-
-
Constructor Detail
-
SeedPostings
public SeedPostings(long seed, int minDocFreq, int maxDocFreq, IndexOptions options, boolean allowPayloads)
-
-
Method Detail
-
nextDoc
public int nextDoc()
- Specified by:
nextDocin classDocIdSetIterator
-
docID
public int docID()
- Specified by:
docIDin classDocIdSetIterator
-
freq
public int freq()
- Specified by:
freqin classPostingsEnum
-
nextPosition
public int nextPosition()
- Specified by:
nextPositionin classPostingsEnum
-
startOffset
public int startOffset()
- Specified by:
startOffsetin classPostingsEnum
-
endOffset
public int endOffset()
- Specified by:
endOffsetin classPostingsEnum
-
getPayload
public BytesRef getPayload()
- Specified by:
getPayloadin classPostingsEnum
-
advance
public int advance(int target) throws IOException- Specified by:
advancein classDocIdSetIterator- Throws:
IOException
-
cost
public long cost()
- Specified by:
costin classDocIdSetIterator
-
-