Class IDVersionSegmentTermsEnum
java.lang.Object
org.apache.lucene.index.TermsEnum
org.apache.lucene.index.BaseTermsEnum
org.apache.lucene.sandbox.codecs.idversion.IDVersionSegmentTermsEnum
- All Implemented Interfaces:
BytesRefIterator
Iterates through terms in this field; this class is public so users can cast it to call
seekExact(BytesRef, long)
for optimistic-concurrency, and also getVersion()
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
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
docFreq()
long
Get the version of the currently seek'd term; only valid if we are positioned.impacts
(int flags) next()
long
ord()
postings
(PostingsEnum reuse, int flags) void
seekExact
(long ord) boolean
boolean
Optimized version ofseekExact(BytesRef)
that can sometimes fail-fast if the version indexed with the requested ID is less than the specified minIDVersion.void
term()
toString()
long
Methods inherited from class org.apache.lucene.index.BaseTermsEnum
attributes
-
Method Details
-
seekExact
- Overrides:
seekExact
in classBaseTermsEnum
- Throws:
IOException
-
getVersion
public long getVersion()Get the version of the currently seek'd term; only valid if we are positioned. -
seekExact
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
- Specified by:
seekCeil
in classTermsEnum
- Throws:
IOException
-
next
- Throws:
IOException
-
term
-
docFreq
- Specified by:
docFreq
in classTermsEnum
- Throws:
IOException
-
totalTermFreq
- Specified by:
totalTermFreq
in classTermsEnum
- Throws:
IOException
-
postings
- Specified by:
postings
in classTermsEnum
- Throws:
IOException
-
impacts
- Specified by:
impacts
in classTermsEnum
- Throws:
IOException
-
seekExact
- Overrides:
seekExact
in classBaseTermsEnum
-
termState
- Overrides:
termState
in classBaseTermsEnum
- Throws:
IOException
-
seekExact
public void seekExact(long ord) -
ord
public long ord() -
toString
-