org.apache.lucene.codecs.uniformsplit.sharedterms

## Class STUniformSplitTermsReader

- java.lang.Object
- - org.apache.lucene.index.Fields
  - - org.apache.lucene.codecs.FieldsProducer
    - - org.apache.lucene.codecs.uniformsplit.UniformSplitTermsReader
      - - org.apache.lucene.codecs.uniformsplit.sharedterms.STUniformSplitTermsReader

- All Implemented Interfaces:
    Closeable, AutoCloseable, Iterable<String>, Accountable

      public class STUniformSplitTermsReader
      extends UniformSplitTermsReader

  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.
  See Also:
    `STUniformSplitTermsWriter`
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Field Summary

    - ### Fields inherited from class org.apache.lucene.codecs.uniformsplit.UniformSplitTermsReader

      `blockInput, dictionaryInput, fieldToTermsMap, postingsReader, sortedFieldNames, version`

    - ### Fields inherited from class org.apache.lucene.index.Fields

      `EMPTY_ARRAY`

    - ### Fields inherited from interface org.apache.lucene.util.Accountable

      `NULL_ACCOUNTABLE`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `STUniformSplitTermsReader(PostingsReaderBase postingsReader, SegmentReadState state, BlockDecoder blockDecoder, boolean dictionaryOnHeap)`
    `protected` | `STUniformSplitTermsReader(PostingsReaderBase postingsReader, SegmentReadState state, BlockDecoder blockDecoder, boolean dictionaryOnHeap, FieldMetadata.Serializer fieldMetadataReader, String codecName, int versionStart, int versionCurrent, String termsBlocksExtension, String dictionaryExtension)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected FieldMetadata` | `createUnionFieldMetadata(Iterable<FieldMetadata> fieldMetadataIterable)` Creates a virtual `FieldMetadata` that is the union of the given `FieldMetadata`s.
    `protected void` | `fillFieldMap(PostingsReaderBase postingsReader, SegmentReadState state, BlockDecoder blockDecoder, boolean dictionaryOnHeap, IndexInput dictionaryInput, IndexInput blockInput, Collection<FieldMetadata> fieldMetadataCollection, FieldInfos fieldInfos)`
    `protected long` | `getTermsRamBytesUsed()`

    - ### Methods inherited from class org.apache.lucene.codecs.uniformsplit.UniformSplitTermsReader

      `checkIntegrity, close, createDictionaryBrowserSupplier, iterator, ramBytesUsed, readEncodedFieldsMetadata, readFieldsMetadata, readUnencodedFieldsMetadata, seekFieldsMetadata, size, terms`

    - ### Methods inherited from class org.apache.lucene.codecs.FieldsProducer

      `getMergeInstance`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.lucene.util.Accountable

      `getChildResources`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Constructor Detail

    - #### STUniformSplitTermsReader

          public STUniformSplitTermsReader(PostingsReaderBase postingsReader,
                                           SegmentReadState state,
                                           BlockDecoder blockDecoder,
                                           boolean dictionaryOnHeap)
                                    throws IOException

      Throws:
        `IOException`
      See Also:
        `UniformSplitTermsReader.UniformSplitTermsReader(PostingsReaderBase, SegmentReadState, BlockDecoder, boolean)`

    - #### STUniformSplitTermsReader

          protected STUniformSplitTermsReader(PostingsReaderBase postingsReader,
                                              SegmentReadState state,
                                              BlockDecoder blockDecoder,
                                              boolean dictionaryOnHeap,
                                              FieldMetadata.Serializer fieldMetadataReader,
                                              String codecName,
                                              int versionStart,
                                              int versionCurrent,
                                              String termsBlocksExtension,
                                              String dictionaryExtension)
                                       throws IOException

      Throws:
        `IOException`
      See Also:
        `UniformSplitTermsReader.UniformSplitTermsReader(PostingsReaderBase, SegmentReadState, BlockDecoder, boolean)`

  - ### Method Detail

    - #### fillFieldMap

          protected void fillFieldMap(PostingsReaderBase postingsReader,
                                      SegmentReadState state,
                                      BlockDecoder blockDecoder,
                                      boolean dictionaryOnHeap,
                                      IndexInput dictionaryInput,
                                      IndexInput blockInput,
                                      Collection<FieldMetadata> fieldMetadataCollection,
                                      FieldInfos fieldInfos)
                               throws IOException

      Overrides:
        `fillFieldMap` in class `UniformSplitTermsReader`
      Throws:
        `IOException`

    - #### getTermsRamBytesUsed

          protected long getTermsRamBytesUsed()

      Overrides:
        `getTermsRamBytesUsed` in class `UniformSplitTermsReader`

    - #### createUnionFieldMetadata

          protected FieldMetadata createUnionFieldMetadata(Iterable<FieldMetadata> fieldMetadataIterable)

      Creates a virtual `FieldMetadata` that is the union of the given `FieldMetadata`s. Its `FieldMetadata.getFirstBlockStartFP()`, `FieldMetadata.getLastBlockStartFP()` and `FieldMetadata.getLastTerm()` are respectively the min and max among the `FieldMetadata`s provided as parameter.

Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.