Class IDVersionSegmentTermsEnum
- java.lang.Object
-
- org.apache.lucene.index.TermsEnum
-
- org.apache.lucene.codecs.idversion.IDVersionSegmentTermsEnum
-
- All Implemented Interfaces:
BytesRefIterator
public final class IDVersionSegmentTermsEnum extends TermsEnum
Iterates through terms in this field; this class is public so users can cast it to callseekExact(BytesRef, long)
for optimistic-concurreny, and alsogetVersion()
to get the version of the currently seek'd term.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.index.TermsEnum
TermsEnum.SeekStatus
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
docFreq()
long
getVersion()
Get the version of the currently seek'd term; only valid if we are positioned.BytesRef
next()
long
ord()
PostingsEnum
postings(PostingsEnum reuse, int flags)
TermsEnum.SeekStatus
seekCeil(BytesRef target)
void
seekExact(long ord)
boolean
seekExact(BytesRef target)
boolean
seekExact(BytesRef target, long minIDVersion)
Optimized version ofseekExact(BytesRef)
that can sometimes fail-fast if the version indexed with the requested ID is less than the specified minIDVersion.void
seekExact(BytesRef target, TermState otherState)
BytesRef
term()
TermState
termState()
String
toString()
long
totalTermFreq()
-
Methods inherited from class org.apache.lucene.index.TermsEnum
attributes, postings
-
-
-
-
Method Detail
-
seekExact
public boolean seekExact(BytesRef target) throws IOException
- Overrides:
seekExact
in classTermsEnum
- Throws:
IOException
-
getVersion
public long getVersion()
Get the version of the currently seek'd term; only valid if we are positioned.
-
seekExact
public boolean seekExact(BytesRef target, long minIDVersion) throws IOException
Optimized version ofseekExact(BytesRef)
that can sometimes fail-fast if the version indexed with the requested ID is less than the specified minIDVersion. Applications that index a monotonically increasing global version with each document can use this for fast optimistic concurrency.- Throws:
IOException
-
seekCeil
public TermsEnum.SeekStatus seekCeil(BytesRef target) throws IOException
- Specified by:
seekCeil
in classTermsEnum
- Throws:
IOException
-
next
public BytesRef next() throws IOException
- Throws:
IOException
-
docFreq
public int docFreq() throws IOException
- Specified by:
docFreq
in classTermsEnum
- Throws:
IOException
-
totalTermFreq
public long totalTermFreq() throws IOException
- Specified by:
totalTermFreq
in classTermsEnum
- Throws:
IOException
-
postings
public PostingsEnum postings(PostingsEnum reuse, int flags) throws IOException
- Specified by:
postings
in classTermsEnum
- Throws:
IOException
-
termState
public TermState termState() throws IOException
- Overrides:
termState
in classTermsEnum
- Throws:
IOException
-
-