Modifier and Type | Field and Description |
---|---|
static FieldInfos |
EMPTY
An instance without any fields.
|
Constructor and Description |
---|
FieldInfos(FieldInfo[] infos)
Constructs a new FieldInfos from an array of FieldInfo objects
|
Modifier and Type | Method and 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 name
|
static Collection<String> |
getIndexedFields(IndexReader reader)
Returns a set of names of fields that have a terms index.
|
static FieldInfos |
getMergedFieldInfos(IndexReader reader)
Call this to get the (merged) FieldInfos for a
composite reader.
|
String |
getSoftDeletesField()
Returns the soft-deletes field name if exists; otherwise returns null
|
boolean |
hasDocValues()
Returns true if any fields have DocValues
|
boolean |
hasFreq()
Returns true if any fields have freqs
|
boolean |
hasNorms()
Returns true if any fields have norms
|
boolean |
hasOffsets()
Returns true if any fields have offsets
|
boolean |
hasPayloads()
Returns true if any fields have payloads
|
boolean |
hasPointValues()
Returns true if any fields have PointValues
|
boolean |
hasProx()
Returns true if any fields have positions
|
boolean |
hasVectors()
Returns true if any fields have vectors
|
Iterator<FieldInfo> |
iterator()
Returns an iterator over all the fieldinfo objects present,
ordered by ascending field number
|
int |
size()
Returns the number of fields
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public static final FieldInfos EMPTY
public FieldInfos(FieldInfo[] infos)
public static FieldInfos getMergedFieldInfos(IndexReader reader)
NOTE: the returned field numbers will likely not
correspond to the actual field numbers in the underlying
readers, and codec metadata (FieldInfo.getAttribute(String)
will be unavailable.
public static Collection<String> getIndexedFields(IndexReader reader)
public boolean hasFreq()
public boolean hasProx()
public boolean hasPayloads()
public boolean hasOffsets()
public boolean hasVectors()
public boolean hasNorms()
public boolean hasDocValues()
public boolean hasPointValues()
public String getSoftDeletesField()
public int size()
public Iterator<FieldInfo> iterator()
public FieldInfo fieldInfo(String fieldName)
public FieldInfo fieldInfo(int fieldNumber)
fieldNumber
- field's number.IllegalArgumentException
- if fieldNumber is negativeCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.