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 TypeMethodDescriptionintdocFreq()longGet the version of the currently seek'd term; only valid if we are positioned.impacts(int flags) next()longord()postings(PostingsEnum reuse, int flags) voidseekExact(long ord) booleanbooleanOptimized version ofseekExact(BytesRef)that can sometimes fail-fast if the version indexed with the requested ID is less than the specified minIDVersion.voidterm()toString()longMethods inherited from class org.apache.lucene.index.BaseTermsEnum
attributes, prepareSeekExact
-
Method Details
-
seekExact
- Overrides:
seekExactin 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:
seekCeilin classTermsEnum- Throws:
IOException
-
next
- Throws:
IOException
-
term
-
docFreq
- Specified by:
docFreqin classTermsEnum- Throws:
IOException
-
totalTermFreq
- Specified by:
totalTermFreqin classTermsEnum- Throws:
IOException
-
postings
- Specified by:
postingsin classTermsEnum- Throws:
IOException
-
impacts
- Specified by:
impactsin classTermsEnum- Throws:
IOException
-
seekExact
- Overrides:
seekExactin classBaseTermsEnum
-
termState
- Overrides:
termStatein classBaseTermsEnum- Throws:
IOException
-
seekExact
public void seekExact(long ord) -
ord
public long ord() -
toString
-