Class Lucene40StoredFieldsFormat
Lucene 4.0 Stored Fields Format.
Stored fields are represented by two files:
-
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))
-
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 Int32BitsToSingle(Int32)
- 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))
Assembly: DistributedLucene.Net.dll
Syntax
public class Lucene40StoredFieldsFormat : StoredFieldsFormat
Constructors
Name | Description |
---|---|
Lucene40StoredFieldsFormat() | Sole constructor. |
Methods
Name | Description |
---|---|
FieldsReader(Directory, SegmentInfo, FieldInfos, IOContext) | |
FieldsWriter(Directory, SegmentInfo, IOContext) |