## org.apache.lucene.codecs.lucene40
Class Lucene40FieldInfosFormat

    java.lang.Object
      org.apache.lucene.codecs.FieldInfosFormat
          org.apache.lucene.codecs.lucene40.Lucene40FieldInfosFormat

Deprecated. Only for reading old 4.0 and 4.1 segments

    @Deprecated
    public class Lucene40FieldInfosFormat

extends FieldInfosFormat

Lucene 4.0 Field Infos format.

Field names are stored in the field info file, with suffix `.fnm`.

FieldInfos (.fnm) --> Header,FieldsCount, <FieldName,FieldNumber, FieldBits,DocValuesBits,Attributes> FieldsCount

Data types:

- Header --> `CodecHeader`
- FieldsCount --> `VInt`
- FieldName --> `String`
- FieldBits, DocValuesBits --> `Byte`
- FieldNumber --> `VInt`
- Attributes --> `Map<String,String>`

Field Descriptions:

- FieldsCount: the number of fields in this file.
- FieldName: name of the field as a UTF-8 String.
- FieldNumber: the field's number. Note that unlike previous versions of Lucene, the fields are not numbered implicitly by their order in the file, instead explicitly.
- FieldBits: a byte containing field options.
  - The low-order bit is one for indexed fields, and zero for non-indexed fields.
  - The second lowest-order bit is one for fields that have term vectors stored, and zero for fields without term vectors.
  - If the third lowest order-bit is set (0x4), offsets are stored into the postings list in addition to positions.
  - Fourth bit is unused.
  - If the fifth lowest-order bit is set (0x10), norms are omitted for the indexed field.
  - If the sixth lowest-order bit is set (0x20), payloads are stored for the indexed field.
  - If the seventh lowest-order bit is set (0x40), term frequencies and positions omitted for the indexed field.
  - If the eighth lowest-order bit is set (0x80), positions are omitted for the indexed field.
- DocValuesBits: a byte containing per-document value types. The type recorded as two four-bit integers, with the high-order bits representing `norms` options, and the low-order bits representing `DocValues` options. Each four-bit integer can be decoded as such:
  - 0: no DocValues for this field.
  - 1: variable-width signed integers. (`Type#VAR_INTS VAR_INTS`)
  - 2: 32-bit floating point values. (`Type#FLOAT_32 FLOAT_32`)
  - 3: 64-bit floating point values. (`Type#FLOAT_64 FLOAT_64`)
  - 4: fixed-length byte array values. (`Type#BYTES_FIXED_STRAIGHT BYTES_FIXED_STRAIGHT`)
  - 5: fixed-length dereferenced byte array values. (`Type#BYTES_FIXED_DEREF BYTES_FIXED_DEREF`)
  - 6: variable-length byte array values. (`Type#BYTES_VAR_STRAIGHT BYTES_VAR_STRAIGHT`)
  - 7: variable-length dereferenced byte array values. (`Type#BYTES_VAR_DEREF BYTES_VAR_DEREF`)
  - 8: 16-bit signed integers. (`Type#FIXED_INTS_16 FIXED_INTS_16`)
  - 9: 32-bit signed integers. (`Type#FIXED_INTS_32 FIXED_INTS_32`)
  - 10: 64-bit signed integers. (`Type#FIXED_INTS_64 FIXED_INTS_64`)
  - 11: 8-bit signed integers. (`Type#FIXED_INTS_8 FIXED_INTS_8`)
  - 12: fixed-length sorted byte array values. (`Type#BYTES_FIXED_SORTED BYTES_FIXED_SORTED`)
  - 13: variable-length sorted byte array values. (`Type#BYTES_VAR_SORTED BYTES_VAR_SORTED`)
- Attributes: a key-value map of codec-private attributes.

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

Constructor Summary
`Lucene40FieldInfosFormat()` Deprecated. Sole constructor.

Method Summary
`FieldInfosReader` `getFieldInfosReader()` Deprecated. Returns a `FieldInfosReader` to read field infos from the index
`FieldInfosWriter` `getFieldInfosWriter()` Deprecated. Returns a `FieldInfosWriter` to write field infos to the index

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Lucene40FieldInfosFormat

    public Lucene40FieldInfosFormat()

  Deprecated.
  Sole constructor.

Method Detail

### getFieldInfosReader

    public FieldInfosReader getFieldInfosReader()
                                         throws IOException

  Deprecated.
  Description copied from class: `FieldInfosFormat`
  Returns a `FieldInfosReader` to read field infos from the index

  Specified by:
    `getFieldInfosReader` in class `FieldInfosFormat`
  Throws:
    `IOException`

### getFieldInfosWriter

    public FieldInfosWriter getFieldInfosWriter()
                                         throws IOException

  Deprecated.
  Description copied from class: `FieldInfosFormat`
  Returns a `FieldInfosWriter` to write field infos to the index

  Specified by:
    `getFieldInfosWriter` in class `FieldInfosFormat`
  Throws:
    `IOException`

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