org.apache.lucene.codecs.simpletext
Class SimpleTextDocValuesConsumer

java.lang.Object
  extended by org.apache.lucene.codecs.DocValuesConsumer
      extended by org.apache.lucene.codecs.simpletext.SimpleTextDocValuesConsumer

public class SimpleTextDocValuesConsumer
extends DocValuesConsumer

Writes plain-text DocValues.

FOR RECREATIONAL USE ONLY

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

Field Summary
protected  IOContext ctx
           
protected  Directory dir
           
protected  BytesRefHash hash
           
protected  int maxDocId
           
protected  BytesRef scratch
           
protected  String segment
           
protected  DocValues.Type type
           
 
Fields inherited from class org.apache.lucene.codecs.DocValuesConsumer
spare
 
Constructor Summary
SimpleTextDocValuesConsumer(String segment, Directory dir, IOContext ctx, DocValues.Type type, String segmentSuffix)
           
 
Method Summary
 void add(int docID, IndexableField value)
           
 void finish(int docCount)
           
protected  BytesRef getHeader()
           
protected  DocValues.Type getType()
           
 int getValueSize()
           
protected  void writeDoc(IndexOutput output, int docId, BytesRef spare)
           
 
Methods inherited from class org.apache.lucene.codecs.DocValuesConsumer
merge, merge, mergeDoc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scratch

protected BytesRef scratch

maxDocId

protected int maxDocId

segment

protected final String segment

dir

protected final Directory dir

ctx

protected final IOContext ctx

type

protected final DocValues.Type type

hash

protected final BytesRefHash hash
Constructor Detail

SimpleTextDocValuesConsumer

public SimpleTextDocValuesConsumer(String segment,
                                   Directory dir,
                                   IOContext ctx,
                                   DocValues.Type type,
                                   String segmentSuffix)
Method Detail

add

public void add(int docID,
                IndexableField value)
         throws IOException
Specified by:
add in class DocValuesConsumer
Throws:
IOException

getHeader

protected BytesRef getHeader()

finish

public void finish(int docCount)
            throws IOException
Specified by:
finish in class DocValuesConsumer
Throws:
IOException

writeDoc

protected void writeDoc(IndexOutput output,
                        int docId,
                        BytesRef spare)
                 throws IOException
Throws:
IOException

getType

protected DocValues.Type getType()
Specified by:
getType in class DocValuesConsumer

getValueSize

public int getValueSize()
Specified by:
getValueSize in class DocValuesConsumer


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