Class STUniformSplitTermsWriter

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class STUniformSplitTermsWriter
    extends UniformSplitTermsWriter
    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.

    The block file contains all the term blocks for all fields. Each block line, for a single term, may have multiple fields TermState. The block file also contains the fields metadata at the end of the file.

    The dictionary file contains a single trie (FST bytes) for all fields.

    This structure is adapted when there are lots of fields. In this case the shared-terms dictionary trie is much smaller.

    This FieldsConsumer requires a custom merge(MergeState, NormsProducer) method for efficiency. The regular merge would scan all the fields sequentially, which internally would scan the whole shared-terms dictionary as many times as there are fields. Whereas the custom merge directly scans the internal shared-terms dictionary of all segments to merge, thus scanning once whatever the number of fields is.

    WARNING: This API is experimental and might change in incompatible ways in the next release.