public abstract class Fields extends Object implements Iterable<String>
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.Modifier and Type | Field and Description |
---|---|
static Fields[] |
EMPTY_ARRAY
Zero-length
Fields array. |
Modifier | Constructor and Description |
---|---|
protected |
Fields()
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract Iterator<String> |
iterator()
Returns an iterator that will step through all fields
names.
|
abstract int |
size()
Returns the number of fields or -1 if the number of
distinct field names is unknown.
|
abstract Terms |
terms(String field)
Get the
Terms for this field. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public static final Fields[] EMPTY_ARRAY
Fields
array.protected Fields()
public abstract Iterator<String> iterator()
public abstract Terms terms(String field) throws IOException
Terms
for this field. This will return
null if the field does not exist.IOException
public abstract int size()
iterator()
will return as many field names.Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.