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 (Write
Int64(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 (Write
Header(Data )Output, String, Int32) - FieldValuesPosition --> Uint64 (Write
Int64(Int64) )
-
This contains the stored fields of each document, as follows:
- FieldData (.fdt) --> <Header>, <DocFieldData> SegSize
- Header --> CodecHeader (Write
Header(Data )Output, String, Int32) - DocFieldData --> FieldCount, <FieldNum, Bits, Value> FieldCount
- FieldCount --> VInt (Write
VInt32(Int32) ) - FieldNum --> VInt (Write
VInt32(Int32) ) - Bits --> Byte (Write
Byte(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 (Write
Byte(Byte) ) >^ValueSize - ValueSize --> VInt (Write
VInt32(Int32) )
This is a Lucene.NET EXPERIMENTAL API, use at your own risk
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 | |
Segment |
si | |
Field |
fn | |
IOContext | context |
Returns
Type | Description |
---|---|
Stored |
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 | |
Segment |
si | |
IOContext | context |
Returns
Type | Description |
---|---|
Stored |