org.apache.lucene.codecs.compressing

## Class CompressingCodec

- java.lang.Object
- - org.apache.lucene.codecs.Codec
  - - org.apache.lucene.codecs.FilterCodec
    - - org.apache.lucene.codecs.compressing.CompressingCodec

- All Implemented Interfaces:
    NamedSPILoader.NamedSPI
  Direct Known Subclasses:
    DeflateWithPresetCompressingCodec, DummyCompressingCodec, FastCompressingCodec, FastDecompressionCompressingCodec, HighCompressionCompressingCodec, LZ4WithPresetCompressingCodec

      public abstract class CompressingCodec
      extends FilterCodec

  A codec that uses `CompressingStoredFieldsFormat` for its stored fields and delegates to the default codec for everything else.

- - ### Field Summary

    - ### Fields inherited from class org.apache.lucene.codecs.FilterCodec

      `delegate`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompressingCodec(String name, CompressionMode compressionMode, int chunkSize, int maxDocsPerChunk, int blockSize)` Creates a compressing codec with an empty segment suffix
    `CompressingCodec(String name, String segmentSuffix, CompressionMode compressionMode, int chunkSize, int maxDocsPerChunk, int blockShift)` Creates a compressing codec with a given segment suffix

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CompressingCodec` | `randomInstance(Random random)` Creates a random `CompressingCodec` that is using an empty segment suffix
    `static CompressingCodec` | `randomInstance(Random random, boolean withSegmentSuffix)` Creates a random `CompressingCodec` that is using a segment suffix
    `static CompressingCodec` | `randomInstance(Random random, int chunkSize, int maxDocsPerChunk, boolean withSegmentSuffix, int blockShift)` Create a random instance.
    `static CompressingCodec` | `reasonableInstance(Random random)` Creates a random `CompressingCodec` with more reasonable parameters for big tests.
    `StoredFieldsFormat` | `storedFieldsFormat()`
    `TermVectorsFormat` | `termVectorsFormat()`
    `String` | `toString()`

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

      `compoundFormat, docValuesFormat, fieldInfosFormat, liveDocsFormat, normsFormat, pointsFormat, postingsFormat, segmentInfoFormat`

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

      `availableCodecs, forName, getDefault, getName, reloadCodecs, setDefault`

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

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

- - ### Constructor Detail

    - #### CompressingCodec

          public CompressingCodec(String name,
                                  String segmentSuffix,
                                  CompressionMode compressionMode,
                                  int chunkSize,
                                  int maxDocsPerChunk,
                                  int blockShift)

      Creates a compressing codec with a given segment suffix

    - #### CompressingCodec

          public CompressingCodec(String name,
                                  CompressionMode compressionMode,
                                  int chunkSize,
                                  int maxDocsPerChunk,
                                  int blockSize)

      Creates a compressing codec with an empty segment suffix

  - ### Method Detail

    - #### randomInstance

          public static CompressingCodec randomInstance(Random random,
                                                        int chunkSize,
                                                        int maxDocsPerChunk,
                                                        boolean withSegmentSuffix,
                                                        int blockShift)

      Create a random instance.

    - #### randomInstance

          public static CompressingCodec randomInstance(Random random)

      Creates a random `CompressingCodec` that is using an empty segment suffix

    - #### reasonableInstance

          public static CompressingCodec reasonableInstance(Random random)

      Creates a random `CompressingCodec` with more reasonable parameters for big tests.

    - #### randomInstance

          public static CompressingCodec randomInstance(Random random,
                                                        boolean withSegmentSuffix)

      Creates a random `CompressingCodec` that is using a segment suffix

    - #### storedFieldsFormat

          public StoredFieldsFormat storedFieldsFormat()

      Overrides:
        `storedFieldsFormat` in class `FilterCodec`

    - #### termVectorsFormat

          public TermVectorsFormat termVectorsFormat()

      Overrides:
        `termVectorsFormat` in class `FilterCodec`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Codec`

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