Package org.apache.lucene.backward_codecs.lucene84

# Class Lucene84Codec

java.lang.Object
org.apache.lucene.codecs.Codec
org.apache.lucene.backward_codecs.lucene84.Lucene84Codec

All Implemented Interfaces:
  `NamedSPILoader.NamedSPI`

public class Lucene84Codec extends Codec
Implements the Lucene 8.4 index format, with configurable per-field postings and docvalues formats.

If you want to reuse functionality of this codec in another codec, extend `FilterCodec`.

See Also:
  - `package documentation for file format details.`
WARNING: This API is experimental and might change in incompatible ways in the next release.

## Constructor Summary

Constructors
Constructor
Description
`Lucene84Codec()`
Instantiates a new codec.
`Lucene84Codec(Lucene50StoredFieldsFormat.Mode mode)`
Instantiates a new codec, specifying the stored fields compression mode to use.

## Method Summary

Modifier and Type
Method
Description
`CompoundFormat`
`compoundFormat()`
`final DocValuesFormat`
`docValuesFormat()`
`final FieldInfosFormat`
`fieldInfosFormat()`
`DocValuesFormat`
`getDocValuesFormatForField(String field)`
Returns the docvalues format that should be used for writing new segments of `field` .
`PostingsFormat`
`getPostingsFormatForField(String field)`
Returns the postings format that should be used for writing new segments of `field`.
`KnnVectorsFormat`
`knnVectorsFormat()`
`final LiveDocsFormat`
`liveDocsFormat()`
`NormsFormat`
`normsFormat()`
`PointsFormat`
`pointsFormat()`
`PostingsFormat`
`postingsFormat()`
`SegmentInfoFormat`
`segmentInfoFormat()`
`StoredFieldsFormat`
`storedFieldsFormat()`
`TermVectorsFormat`
`termVectorsFormat()`

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

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

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

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

## Constructor Details

### Lucene84Codec

public Lucene84Codec()
Instantiates a new codec.

### Lucene84Codec

public Lucene84Codec(Lucene50StoredFieldsFormat.Mode mode)
Instantiates a new codec, specifying the stored fields compression mode to use.

Parameters:
  `mode` - stored fields compression mode to use for newly flushed/merged segments.

## Method Details

### storedFieldsFormat

public StoredFieldsFormat storedFieldsFormat()

Specified by:
  `storedFieldsFormat` in class `Codec`

### termVectorsFormat

public TermVectorsFormat termVectorsFormat()

Specified by:
  `termVectorsFormat` in class `Codec`

### postingsFormat

public PostingsFormat postingsFormat()

Specified by:
  `postingsFormat` in class `Codec`

### fieldInfosFormat

public final FieldInfosFormat fieldInfosFormat()

Specified by:
  `fieldInfosFormat` in class `Codec`

### segmentInfoFormat

public SegmentInfoFormat segmentInfoFormat()

Specified by:
  `segmentInfoFormat` in class `Codec`

### liveDocsFormat

public final LiveDocsFormat liveDocsFormat()

Specified by:
  `liveDocsFormat` in class `Codec`

### compoundFormat

public CompoundFormat compoundFormat()

Specified by:
  `compoundFormat` in class `Codec`

### pointsFormat

public PointsFormat pointsFormat()

Specified by:
  `pointsFormat` in class `Codec`

### knnVectorsFormat

public KnnVectorsFormat knnVectorsFormat()

Specified by:
  `knnVectorsFormat` in class `Codec`

### getPostingsFormatForField

public PostingsFormat getPostingsFormatForField(String field)
Returns the postings format that should be used for writing new segments of `field`.

The default implementation always returns "Lucene84".

WARNING: if you subclass, you are responsible for index backwards compatibility: future version of Lucene are only guaranteed to be able to read the default implementation.

### getDocValuesFormatForField

public DocValuesFormat getDocValuesFormatForField(String field)
Returns the docvalues format that should be used for writing new segments of `field` .

The default implementation always returns "Lucene80".

WARNING: if you subclass, you are responsible for index backwards compatibility: future version of Lucene are only guaranteed to be able to read the default implementation.

### docValuesFormat

public final DocValuesFormat docValuesFormat()

Specified by:
  `docValuesFormat` in class `Codec`

### normsFormat

public NormsFormat normsFormat()

Specified by:
  `normsFormat` in class `Codec`