org.apache.lucene.index
Class Fields

java.lang.Object
  extended by org.apache.lucene.index.Fields
Direct Known Subclasses:
FieldsProducer, FilterAtomicReader.FilterFields, MultiFields

public abstract class Fields
extends Object

Flex API for access to fields and terms

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

Field Summary
static Fields[] EMPTY_ARRAY
           
 
Constructor Summary
Fields()
           
 
Method Summary
 long getUniqueTermCount()
          Returns the number of terms for all fields, or -1 if this measure isn't stored by the codec.
abstract  FieldsEnum iterator()
          Returns an iterator that will step through all fields names.
abstract  int size()
          Returns the number of terms for all fields, or -1 if this measure isn't stored by the codec.
abstract  Terms terms(String field)
          Get the Terms for this field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_ARRAY

public static final Fields[] EMPTY_ARRAY
Constructor Detail

Fields

public Fields()
Method Detail

iterator

public abstract FieldsEnum iterator()
                             throws IOException
Returns an iterator that will step through all fields names. This will not return null.

Throws:
IOException

terms

public abstract Terms terms(String field)
                     throws IOException
Get the Terms for this field. This will return null if the field does not exist.

Throws:
IOException

size

public abstract int size()
                  throws IOException
Returns the number of terms for all fields, or -1 if this measure isn't stored by the codec. Note that, just like other term measures, this measure does not take deleted documents into account.

Throws:
IOException

getUniqueTermCount

public long getUniqueTermCount()
                        throws IOException
Returns the number of terms for all fields, or -1 if this measure isn't stored by the codec. Note that, just like other term measures, this measure does not take deleted documents into account.

Throws:
IOException


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