Package org.apache.lucene.index
Class FieldInfos
- java.lang.Object
-
- org.apache.lucene.index.FieldInfos
-
-
Field Summary
Fields Modifier and Type Field Description static FieldInfos
EMPTY
An instance without any fields.
-
Constructor Summary
Constructors Constructor Description FieldInfos(FieldInfo[] infos)
Constructs a new FieldInfos from an array of FieldInfo objects
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FieldInfo
fieldInfo(int fieldNumber)
Return the fieldinfo object referenced by the fieldNumber.FieldInfo
fieldInfo(String fieldName)
Return the fieldinfo object referenced by the field nameString
getSoftDeletesField()
Returns the soft-deletes field name if exists; otherwise returns nullboolean
hasDocValues()
Returns true if any fields have DocValuesboolean
hasFreq()
Returns true if any fields have freqsboolean
hasNorms()
Returns true if any fields have normsboolean
hasOffsets()
Returns true if any fields have offsetsboolean
hasPayloads()
Returns true if any fields have payloadsboolean
hasPointValues()
Returns true if any fields have PointValuesboolean
hasProx()
Returns true if any fields have positionsboolean
hasVectors()
Returns true if any fields have vectorsIterator<FieldInfo>
iterator()
Returns an iterator over all the fieldinfo objects present, ordered by ascending field numberint
size()
Returns the number of fields-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
EMPTY
public static final FieldInfos EMPTY
An instance without any fields.
-
-
Constructor Detail
-
FieldInfos
public FieldInfos(FieldInfo[] infos)
Constructs a new FieldInfos from an array of FieldInfo objects
-
-
Method Detail
-
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
-
hasPointValues
public boolean hasPointValues()
Returns true if any fields have PointValues
-
getSoftDeletesField
public String getSoftDeletesField()
Returns the soft-deletes field name if exists; otherwise returns null
-
size
public int size()
Returns the number of fields
-
iterator
public Iterator<FieldInfo> iterator()
Returns an iterator over all the fieldinfo objects present, ordered by ascending field number
-
fieldInfo
public FieldInfo fieldInfo(String fieldName)
Return the fieldinfo object referenced by the field name- Returns:
- the FieldInfo object or null when the given fieldName doesn't exist.
-
fieldInfo
public FieldInfo fieldInfo(int fieldNumber)
Return the fieldinfo object referenced by the fieldNumber.- Parameters:
fieldNumber
- field's number.- Returns:
- the FieldInfo object or null when the given fieldNumber doesn't exist.
- Throws:
IllegalArgumentException
- if fieldNumber is negative
-
-