org.apache.lucene.codecs
Class DocValuesProducer

java.lang.Object
  extended by org.apache.lucene.codecs.DocValuesProducer
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
Lucene45DocValuesProducer

public abstract class DocValuesProducer
extends Object
implements Closeable

Abstract API that produces numeric, binary and sorted docvalues.

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

Nested Class Summary
static class DocValuesProducer.SortedDocsWithField
          A simple implementation of getDocsWithField(org.apache.lucene.index.FieldInfo) that returns true if a document has an ordinal >= 0
static class DocValuesProducer.SortedSetDocsWithField
          A simple implementation of getDocsWithField(org.apache.lucene.index.FieldInfo) that returns true if a document has any ordinals.
 
Constructor Summary
protected DocValuesProducer()
          Sole constructor.
 
Method Summary
abstract  BinaryDocValues getBinary(FieldInfo field)
          Returns BinaryDocValues for this field.
abstract  Bits getDocsWithField(FieldInfo field)
          Returns a Bits at the size of reader.maxDoc(), with turned on bits for each docid that does have a value for this field.
abstract  NumericDocValues getNumeric(FieldInfo field)
          Returns NumericDocValues for this field.
abstract  SortedDocValues getSorted(FieldInfo field)
          Returns SortedDocValues for this field.
abstract  SortedSetDocValues getSortedSet(FieldInfo field)
          Returns SortedSetDocValues for this field.
abstract  long ramBytesUsed()
          Returns approximate RAM bytes used
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.Closeable
close
 

Constructor Detail

DocValuesProducer

protected DocValuesProducer()
Sole constructor. (For invocation by subclass constructors, typically implicit.)

Method Detail

getNumeric

public abstract NumericDocValues getNumeric(FieldInfo field)
                                     throws IOException
Returns NumericDocValues for this field. The returned instance need not be thread-safe: it will only be used by a single thread.

Throws:
IOException

getBinary

public abstract BinaryDocValues getBinary(FieldInfo field)
                                   throws IOException
Returns BinaryDocValues for this field. The returned instance need not be thread-safe: it will only be used by a single thread.

Throws:
IOException

getSorted

public abstract SortedDocValues getSorted(FieldInfo field)
                                   throws IOException
Returns SortedDocValues for this field. The returned instance need not be thread-safe: it will only be used by a single thread.

Throws:
IOException

getSortedSet

public abstract SortedSetDocValues getSortedSet(FieldInfo field)
                                         throws IOException
Returns SortedSetDocValues for this field. The returned instance need not be thread-safe: it will only be used by a single thread.

Throws:
IOException

getDocsWithField

public abstract Bits getDocsWithField(FieldInfo field)
                               throws IOException
Returns a Bits at the size of reader.maxDoc(), with turned on bits for each docid that does have a value for this field. The returned instance need not be thread-safe: it will only be used by a single thread.

Throws:
IOException

ramBytesUsed

public abstract long ramBytesUsed()
Returns approximate RAM bytes used



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