Package org.apache.lucene.index
Class Fields
java.lang.Object
org.apache.lucene.index.Fields
- Direct Known Subclasses:
FieldsProducer,FilterAtomicReader.FilterFields,MultiFields
Flex API for access to fields and terms
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionlongDeprecated.iterate fields and add their size() instead.iterator()Returns an iterator that will step through all fields names.abstract intsize()Returns the number of fields or -1 if the number of distinct field names is unknown.abstract TermsGet theTermsfor this field.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
EMPTY_ARRAY
Zero-lengthFieldsarray.
-
-
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. -
getUniqueTermCount
Deprecated.iterate fields and add their size() instead. this method is only provided as a transition mechanism to access this statistic for 3.x indexes, which do not have this statistic per-field.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- See Also:
-