org.apache.lucene.codecs.simpletext
Class SimpleTextPerDocProducer
java.lang.Object
org.apache.lucene.codecs.PerDocProducer
org.apache.lucene.codecs.PerDocProducerBase
org.apache.lucene.codecs.simpletext.SimpleTextPerDocProducer
- All Implemented Interfaces:
- Closeable
- Direct Known Subclasses:
- SimpleTextNormsFormat.SimpleTextNormsPerDocProducer
public class SimpleTextPerDocProducer
- extends PerDocProducerBase
Reads plain-text DocValues.
FOR RECREATIONAL USE ONLY
- WARNING: This API is experimental and might change in incompatible ways in the next release.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
docValues
protected final TreeMap<String,DocValues> docValues
SimpleTextPerDocProducer
public SimpleTextPerDocProducer(SegmentReadState state,
Comparator<BytesRef> comp,
String segmentSuffix)
throws IOException
- Creates a new
SimpleTextPerDocProducer
instance and loads all
DocValues
instances for this segment and codec.
- Throws:
IOException
docValues
protected Map<String,DocValues> docValues()
- Specified by:
docValues
in class PerDocProducerBase
loadDocValues
protected DocValues loadDocValues(int docCount,
Directory dir,
String id,
DocValues.Type type,
IOContext context)
throws IOException
- Description copied from class:
PerDocProducerBase
- Loads a
DocValues
instance depending on the given DocValues.Type
.
Codecs that use different implementations for a certain DocValues.Type
can
simply override this method and return their custom implementations.
- Specified by:
loadDocValues
in class PerDocProducerBase
- Parameters:
docCount
- number of documents in the segmentdir
- the Directory
to load the DocValues
fromid
- the unique file ID within the segmenttype
- the type to load
- Returns:
- a
DocValues
instance for the given type
- Throws:
IOException
- if an IOException
occurs
closeInternal
protected void closeInternal(Collection<? extends Closeable> closeables)
throws IOException
- Specified by:
closeInternal
in class PerDocProducerBase
- Throws:
IOException
readString
public static String readString(int offset,
BytesRef scratch)
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.