org.apache.lucene.index
Class SortedBytesMergeUtils.MergeContext

java.lang.Object
  extended by org.apache.lucene.index.SortedBytesMergeUtils.MergeContext
Enclosing class:
SortedBytesMergeUtils

public static final class SortedBytesMergeUtils.MergeContext
extends Object

Encapsulates contextual information about the merge. This class holds document id to ordinal mappings, offsets for variable length values and the comparator to sort the merged bytes.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Field Summary
 int[] docToEntry
          Maps each document to the ordinal for its value.
 long[] offsets
          File-offset for each document; will be null if it's not needed (eg fixed-size values).
 int sizePerValues
          How many bytes each value occupies, or -1 if it varies.
 
Constructor Summary
SortedBytesMergeUtils.MergeContext(Comparator<BytesRef> comp, int mergeDocCount, int size, DocValues.Type type)
          Sole constructor.
 
Method Summary
 int getMergeDocCount()
          Returns number of documents merged.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sizePerValues

public final int sizePerValues
How many bytes each value occupies, or -1 if it varies.


docToEntry

public final int[] docToEntry
Maps each document to the ordinal for its value.


offsets

public long[] offsets
File-offset for each document; will be null if it's not needed (eg fixed-size values).

Constructor Detail

SortedBytesMergeUtils.MergeContext

public SortedBytesMergeUtils.MergeContext(Comparator<BytesRef> comp,
                                          int mergeDocCount,
                                          int size,
                                          DocValues.Type type)
Sole constructor.

Method Detail

getMergeDocCount

public int getMergeDocCount()
Returns number of documents merged.



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