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 J2N.BitConversion.Int32BitsToSingle(System.Int32)
- 4<<3: Value is Long as Double (as of J2N.BitConversion.Int64BitsToDouble(System.Int64)
- 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
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Lucene.Net.Codecs.Lucene40
Assembly: Lucene.Net.dll
Syntax
public class Lucene40StoredFieldsFormat : StoredFieldsFormat
Constructors
| Improve this Doc View SourceLucene40StoredFieldsFormat()
Sole constructor.
Declaration
public Lucene40StoredFieldsFormat()
Methods
| Improve this Doc View SourceFieldsReader(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
| Improve this Doc View SourceFieldsWriter(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 |