# Package org.apache.lucene.codecs.uniformsplit.sharedterms

Pluggable term index / block terms dictionary implementations.

Extension of `org.apache.lucene.codecs.uniformsplit` with Shared Terms principle: Terms are shared between all fields. It is particularly adapted to index a massive number of fields because all the terms are stored in a single FST dictionary.

- Designed to be extensible
- Highly reduced on-heap memory usage when dealing with a massive number of fields.

- Class Summary
  Class | Description
  --- | ---
  FieldMetadataTermState | Pair of `FieldMetadata` and `BlockTermState` for a specific field.
  STBlockLine | Represents a term and its details stored in the `BlockTermState`.
  STBlockLine.Serializer | Reads block lines encoded incrementally, with all fields corresponding to the term of the line.
  STBlockReader | Reads terms blocks with the Shared Terms format.
  STBlockWriter | Writes terms blocks with the Shared Terms format.
  STIntersectBlockReader | The "intersect" `TermsEnum` response to `STUniformSplitTerms.intersect(CompiledAutomaton, BytesRef)`, intersecting the terms with an automaton.
  STMergingBlockReader | `TermsEnum` used when merging segments, to enumerate the terms of an input segment and get all the fields `TermState`s of each term.
  STUniformSplitPostingsFormat | `PostingsFormat` based on the Uniform Split technique and supporting Shared Terms.
  STUniformSplitTerms | Extends `UniformSplitTerms` for a shared-terms dictionary, with all the fields of a term in the same block line.
  STUniformSplitTermsReader | A block-based terms index and dictionary based on the Uniform Split technique, and sharing all the fields terms in the same dictionary, with all the fields of a term in the same block line.
  STUniformSplitTermsWriter | Extends `UniformSplitTermsWriter` by sharing all the fields terms in the same dictionary and by writing all the fields of a term in the same block line.
  UnionFieldMetadataBuilder | Builds a `FieldMetadata` that is the union of multiple `FieldMetadata`.