Package org.apache.lucene.codecs.idversion
A primary-key postings format that associates a version (long) with each term and
can provide fail-fast lookups by ID and version.
-
Class Summary Class Description IDVersionPostingsFormat A PostingsFormat optimized for primary-key (ID) fields that also record a version (long) for each ID, delivered as a payload created byIDVersionPostingsFormat.longToBytes(long, org.apache.lucene.util.BytesRef)
during indexing.IDVersionSegmentTermsEnum Iterates through terms in this field; this class is public so users can cast it to callIDVersionSegmentTermsEnum.seekExact(BytesRef, long)
for optimistic-concurrency, and alsoIDVersionSegmentTermsEnum.getVersion()
to get the version of the currently seek'd term.VersionBlockTreeTermsReader VersionBlockTreeTermsWriter This is just likeBlockTreeTermsWriter
, except it also stores a version per term, and adds a method to its TermsEnum implementation to seekExact only if the version is >= the specified version.