org.apache.lucene.sandbox.codecs.idversion (Lucene 10.5.0 sandbox API)
Description: declaration: package: org.apache.lucene.sandbox.codecs.idversion

# Package org.apache.lucene.sandbox.codecs.idversion

package org.apache.lucene.sandbox.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.

- Classes
  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 by `IDVersionPostingsFormat.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 call `IDVersionSegmentTermsEnum.seekExact(BytesRef, long)` for optimistic-concurrency, and also `IDVersionSegmentTermsEnum.getVersion()` to get the version of the currently seek'd term.
  VersionBlockTreeTermsReader
  See `VersionBlockTreeTermsWriter`.
  VersionBlockTreeTermsWriter
  This is just like `Lucene103BlockTreeTermsWriter`, 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.