Package org.apache.lucene.index
Class FieldInfos
java.lang.Object
org.apache.lucene.index.FieldInfos
Collection of
FieldInfos (accessible by number or by name).-
Constructor Summary
ConstructorsConstructorDescriptionFieldInfos(FieldInfo[] infos) Constructs a new FieldInfos from an array of FieldInfo objects -
Method Summary
Modifier and TypeMethodDescriptionfieldInfo(int fieldNumber) Return the fieldinfo object referenced by the fieldNumber.Return the fieldinfo object referenced by the field namebooleanReturns true if any fields have DocValuesbooleanhasFreq()Returns true if any fields have freqsbooleanhasNorms()Returns true if any fields have normsbooleanReturns true if any fields have offsetsbooleanReturns true if any fields have payloadsbooleanhasProx()Returns true if any fields have positionsbooleanReturns true if any fields have vectorsiterator()Returns an iterator over all the fieldinfo objects present, ordered by ascending field numberintsize()Returns the number of fieldsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
FieldInfos
Constructs a new FieldInfos from an array of FieldInfo objects
-
-
Method Details
-
hasFreq
public boolean hasFreq()Returns true if any fields have freqs -
hasProx
public boolean hasProx()Returns true if any fields have positions -
hasPayloads
public boolean hasPayloads()Returns true if any fields have payloads -
hasOffsets
public boolean hasOffsets()Returns true if any fields have offsets -
hasVectors
public boolean hasVectors()Returns true if any fields have vectors -
hasNorms
public boolean hasNorms()Returns true if any fields have norms -
hasDocValues
public boolean hasDocValues()Returns true if any fields have DocValues -
size
public int size()Returns the number of fields -
iterator
Returns an iterator over all the fieldinfo objects present, ordered by ascending field number -
fieldInfo
Return the fieldinfo object referenced by the field name- Returns:
- the FieldInfo object or null when the given fieldName doesn't exist.
-
fieldInfo
Return the fieldinfo object referenced by the fieldNumber.- Parameters:
fieldNumber- field's number. if this is negative, this method always returns null.- Returns:
- the FieldInfo object or null when the given fieldNumber doesn't exist.
-