org.apache.lucene.codecs.lucene40.values
Class DocValuesWriterBase

java.lang.Object
  extended by org.apache.lucene.codecs.PerDocConsumer
      extended by org.apache.lucene.codecs.lucene40.values.DocValuesWriterBase
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
Lucene40DocValuesConsumer, SepDocValuesConsumer

public abstract class DocValuesWriterBase
extends PerDocConsumer

Abstract base class for PerDocConsumer implementations

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected  IOContext context
           
static String DATA_EXTENSION
          Filename extension for data files.
static String INDEX_EXTENSION
          Filename extension for index files
protected  String segmentName
           
 
Constructor Summary
protected DocValuesWriterBase(PerDocWriteState state)
           
protected DocValuesWriterBase(PerDocWriteState state, float acceptableOverheadRatio)
           
 
Method Summary
 DocValuesConsumer addValuesField(DocValues.Type valueType, FieldInfo field)
          Adds a new DocValuesField
 void close()
           
 Comparator<BytesRef> getComparator()
           
protected abstract  Directory getDirectory()
           
 
Methods inherited from class org.apache.lucene.codecs.PerDocConsumer
abort, canMerge, getDocValuesForMerge, getDocValuesType, merge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

segmentName

protected final String segmentName

context

protected final IOContext context

INDEX_EXTENSION

public static final String INDEX_EXTENSION
Filename extension for index files

See Also:
Constant Field Values

DATA_EXTENSION

public static final String DATA_EXTENSION
Filename extension for data files.

See Also:
Constant Field Values
Constructor Detail

DocValuesWriterBase

protected DocValuesWriterBase(PerDocWriteState state)
Parameters:
state - The state to initiate a PerDocConsumer instance

DocValuesWriterBase

protected DocValuesWriterBase(PerDocWriteState state,
                              float acceptableOverheadRatio)
Parameters:
state - The state to initiate a PerDocConsumer instance
acceptableOverheadRatio - how to trade space for speed. This option is only applicable for docvalues of type DocValues.Type.BYTES_FIXED_SORTED and DocValues.Type.BYTES_VAR_SORTED.
See Also:
PackedInts.getReader(org.apache.lucene.store.DataInput)
Method Detail

getDirectory

protected abstract Directory getDirectory()
                                   throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Throws:
IOException

addValuesField

public DocValuesConsumer addValuesField(DocValues.Type valueType,
                                        FieldInfo field)
                                 throws IOException
Description copied from class: PerDocConsumer
Adds a new DocValuesField

Specified by:
addValuesField in class PerDocConsumer
Throws:
IOException

getComparator

public Comparator<BytesRef> getComparator()
                                   throws IOException
Throws:
IOException


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