Show / Hide Table of Contents

    Class Lucene40StoredFieldsFormat

    Lucene 4.0 Stored Fields Format.

    Stored fields are represented by two files:

    1. The field index, or .fdx file.

      This is used to find the location within the field data file of the fields of a particular document. Because it contains fixed-length data, this file may be easily randomly accessed. The position of document n 's field data is the Uint64 (WriteInt64(Int64)) at n*8 in this file.

      This contains, for each document, a pointer to its field data, as follows:

      • FieldIndex (.fdx) --> <Header>, <FieldValuesPosition> SegSize
      • Header --> CodecHeader (WriteHeader(DataOutput, String, Int32))
      • FieldValuesPosition --> Uint64 (WriteInt64(Int64))
    2. The field data, or .fdt file.

      This contains the stored fields of each document, as follows:

      • FieldData (.fdt) --> <Header>, <DocFieldData> SegSize
      • Header --> CodecHeader (WriteHeader(DataOutput, String, Int32))
      • DocFieldData --> FieldCount, <FieldNum, Bits, Value> FieldCount
      • FieldCount --> VInt (WriteVInt32(Int32))
      • FieldNum --> VInt (WriteVInt32(Int32))
      • Bits --> Byte (WriteByte(Byte))
        • low order bit reserved.
        • second bit is one for fields containing binary data
        • third bit reserved.
        • 4th to 6th bit (mask: 0x7<<3) define the type of a numeric field:
          • all bits in mask are cleared if no numeric field at all
          • 1<<3: Value is Int
          • 2<<3: Value is Long
          • 3<<3: Value is Int as Float (as of
          • 4<<3: Value is Long as Double (as of
      • Value --> String | BinaryValue | Int | Long (depending on Bits)
      • BinaryValue --> ValueSize, < Byte (WriteByte(Byte)) >^ValueSize
      • ValueSize --> VInt (WriteVInt32(Int32))

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk
    Inheritance
    System.Object
    StoredFieldsFormat
    Lucene40StoredFieldsFormat
    Namespace: Lucene.Net.Codecs.Lucene40
    Assembly: Lucene.Net.dll
    Syntax
    public class Lucene40StoredFieldsFormat : StoredFieldsFormat

    Constructors

    | Improve this Doc View Source

    Lucene40StoredFieldsFormat()

    Sole constructor.

    Declaration
    public Lucene40StoredFieldsFormat()

    Methods

    | Improve this Doc View Source

    FieldsReader(Directory, SegmentInfo, FieldInfos, IOContext)

    Declaration
    public override StoredFieldsReader FieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context)
    Parameters
    Type Name Description
    Directory directory
    SegmentInfo si
    FieldInfos fn
    IOContext context
    Returns
    Type Description
    StoredFieldsReader
    Overrides
    StoredFieldsFormat.FieldsReader(Directory, SegmentInfo, FieldInfos, IOContext)
    | Improve this Doc View Source

    FieldsWriter(Directory, SegmentInfo, IOContext)

    Declaration
    public override StoredFieldsWriter FieldsWriter(Directory directory, SegmentInfo si, IOContext context)
    Parameters
    Type Name Description
    Directory directory
    SegmentInfo si
    IOContext context
    Returns
    Type Description
    StoredFieldsWriter
    Overrides
    StoredFieldsFormat.FieldsWriter(Directory, SegmentInfo, IOContext)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)