Package org.apache.lucene.index
Class Fields
java.lang.Object
org.apache.lucene.index.Fields
- Direct Known Subclasses:
CompressingTermVectorsReader.TVFields,FieldsProducer,FilterLeafReader.FilterFields,FreqProxFields,MemoryIndex.MemoryIndexReader.MemoryFields,MultiFields,ParallelLeafReader.ParallelFields,SimpleTextTermVectorsReader.SimpleTVFields
Provides a
Terms index for fields that have it, and lists which fields do.
This is primarily an internal/experimental API (see FieldsProducer),
although it is also used to expose the set of term vectors per document.-
Field Details
-
EMPTY_ARRAY
Zero-lengthFieldsarray.
-
-
Constructor Details
-
Fields
protected Fields()Sole constructor. (For invocation by subclass constructors, typically implicit.)
-
-
Method Details
-
iterator
Returns an iterator that will step through all fields names. This will not return null. -
terms
Get theTermsfor this field. This will return null if the field does not exist.- Throws:
IOException
-
size
public abstract int size()Returns the number of fields or -1 if the number of distinct field names is unknown. If >= 0,iterator()will return as many field names.
-