org.apache.lucene.codecs.lucene42
Class Lucene42DocValuesFormat

java.lang.Object
  extended by org.apache.lucene.codecs.DocValuesFormat
      extended by org.apache.lucene.codecs.lucene42.Lucene42DocValuesFormat
All Implemented Interfaces:
NamedSPILoader.NamedSPI

Deprecated. Only for reading old 4.2 segments

@Deprecated
public class Lucene42DocValuesFormat
extends DocValuesFormat

Lucene 4.2 DocValues format.

Encodes the four per-document value types (Numeric,Binary,Sorted,SortedSet) with seven basic strategies.

Files:

  1. .dvd: DocValues data
  2. .dvm: DocValues metadata
  1. The DocValues metadata or .dvm file.

    For DocValues field, this stores metadata, such as the offset into the DocValues data (.dvd)

    DocValues metadata (.dvm) --> Header,<FieldNumber,EntryType,Entry>NumFields

    Sorted fields have two entries: a SortedEntry with the FST metadata, and an ordinary NumericEntry for the document-to-ord metadata.

    SortedSet fields have two entries: a SortedEntry with the FST metadata, and an ordinary BinaryEntry for the document-to-ord-list metadata.

    FieldNumber of -1 indicates the end of metadata.

    EntryType is a 0 (NumericEntry), 1 (BinaryEntry, or 2 (SortedEntry)

    DataOffset is the pointer to the start of the data in the DocValues data (.dvd)

    CompressionType indicates how Numeric values will be compressed:

    MinLength and MaxLength represent the min and max byte[] value lengths for Binary values. If they are equal, then all values are of a fixed size, and can be addressed as DataOffset + (docID * length). Otherwise, the binary values are of variable size, and packed integer metadata (PackedVersion,BlockSize) is written for the addresses.

  2. The DocValues data or .dvd file.

    For DocValues field, this stores the actual per-document data (the heavy-lifting)

    DocValues data (.dvd) --> Header,<NumericData | BinaryData | SortedData>NumFields

    SortedSet entries store the list of ordinals in their BinaryData as a sequences of increasing vLongs, delta-encoded.

Limitations:


Field Summary
static int MAX_BINARY_FIELD_LENGTH
          Deprecated. Maximum length for each binary doc values field.
 
Constructor Summary
Lucene42DocValuesFormat()
          Deprecated. Calls Lucene42DocValuesFormat(PackedInts.DEFAULT)
Lucene42DocValuesFormat(float acceptableOverheadRatio)
          Deprecated. Creates a new Lucene42DocValuesFormat with the specified acceptableOverheadRatio for NumericDocValues.
 
Method Summary
 DocValuesConsumer fieldsConsumer(SegmentWriteState state)
          Deprecated. Returns a DocValuesConsumer to write docvalues to the index.
 DocValuesProducer fieldsProducer(SegmentReadState state)
          Deprecated. Returns a DocValuesProducer to read docvalues from the index.
 
Methods inherited from class org.apache.lucene.codecs.DocValuesFormat
availableDocValuesFormats, forName, getName, reloadDocValuesFormats, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_BINARY_FIELD_LENGTH

public static final int MAX_BINARY_FIELD_LENGTH
Deprecated. 
Maximum length for each binary doc values field.

See Also:
Constant Field Values
Constructor Detail

Lucene42DocValuesFormat

public Lucene42DocValuesFormat()
Deprecated. 
Calls Lucene42DocValuesFormat(PackedInts.DEFAULT)


Lucene42DocValuesFormat

public Lucene42DocValuesFormat(float acceptableOverheadRatio)
Deprecated. 
Creates a new Lucene42DocValuesFormat with the specified acceptableOverheadRatio for NumericDocValues.

Parameters:
acceptableOverheadRatio - compression parameter for numerics. Currently this is only used when the number of unique values is small.
WARNING: This API is experimental and might change in incompatible ways in the next release.
Method Detail

fieldsConsumer

public DocValuesConsumer fieldsConsumer(SegmentWriteState state)
                                 throws IOException
Deprecated. 
Description copied from class: DocValuesFormat
Returns a DocValuesConsumer to write docvalues to the index.

Specified by:
fieldsConsumer in class DocValuesFormat
Throws:
IOException

fieldsProducer

public DocValuesProducer fieldsProducer(SegmentReadState state)
                                 throws IOException
Deprecated. 
Description copied from class: DocValuesFormat
Returns a DocValuesProducer to read docvalues from the index.

NOTE: by the time this call returns, it must hold open any files it will need to use; else, those files may be deleted. Additionally, required files may be deleted during the execution of this call before there is a chance to open them. Under these circumstances an IOException should be thrown by the implementation. IOExceptions are expected and will automatically cause a retry of the segment opening logic with the newly revised segments.

Specified by:
fieldsProducer in class DocValuesFormat
Throws:
IOException


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