public abstract class Fields
extends java.lang.Object
implements java.lang.Iterable<java.lang.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 java.util.Iterator<java.lang.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(java.lang.String field)
Get the
Terms for this field. |
public static final Fields[] EMPTY_ARRAY
Fields
array.protected Fields()
public abstract java.util.Iterator<java.lang.String> iterator()
iterator
in interface java.lang.Iterable<java.lang.String>
public abstract Terms terms(java.lang.String field) throws java.io.IOException
Terms
for this field. This will return
null if the field does not exist.java.io.IOException
public abstract int size()
iterator()
will return as many field names.