|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.index.FieldInfo
public final class FieldInfo
Access to the Field Info file that describes document fields and whether or not they are indexed. Each segment has a separate Field Info file. Objects of this class are thread-safe for multiple readers, but only one thread can be adding documents at a time, with no other reader or writer threads accessing this object.
Nested Class Summary | |
---|---|
static class |
FieldInfo.DocValuesType
DocValues types. |
static class |
FieldInfo.IndexOptions
Controls how much information is stored in the postings lists. |
Field Summary | |
---|---|
String |
name
Field's name |
int |
number
Internal field number |
Constructor Summary | |
---|---|
FieldInfo(String name,
boolean indexed,
int number,
boolean storeTermVector,
boolean omitNorms,
boolean storePayloads,
FieldInfo.IndexOptions indexOptions,
FieldInfo.DocValuesType docValues,
FieldInfo.DocValuesType normsType,
Map<String,String> attributes)
Sole Constructor. |
Method Summary | |
---|---|
Map<String,String> |
attributes()
Returns internal codec attributes map. |
String |
getAttribute(String key)
Get a codec attribute value, or null if it does not exist |
long |
getDocValuesGen()
Returns the docValues generation of this field, or -1 if no docValues updates exist for it. |
FieldInfo.DocValuesType |
getDocValuesType()
Returns FieldInfo.DocValuesType of the docValues. |
FieldInfo.IndexOptions |
getIndexOptions()
Returns IndexOptions for the field, or null if the field is not indexed |
FieldInfo.DocValuesType |
getNormType()
Returns FieldInfo.DocValuesType of the norm. |
boolean |
hasDocValues()
Returns true if this field has any docValues. |
boolean |
hasNorms()
Returns true if this field actually has any norms. |
boolean |
hasPayloads()
Returns true if any payloads exist for this field. |
boolean |
hasVectors()
Returns true if any term vectors exist for this field. |
boolean |
isIndexed()
Returns true if this field is indexed. |
boolean |
omitsNorms()
Returns true if norms are explicitly omitted for this field |
String |
putAttribute(String key,
String value)
Puts a codec attribute value. |
void |
setDocValuesGen(long dvGen)
Sets the docValues generation of this field. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final String name
public final int number
Constructor Detail |
---|
public FieldInfo(String name, boolean indexed, int number, boolean storeTermVector, boolean omitNorms, boolean storePayloads, FieldInfo.IndexOptions indexOptions, FieldInfo.DocValuesType docValues, FieldInfo.DocValuesType normsType, Map<String,String> attributes)
Method Detail |
---|
public FieldInfo.IndexOptions getIndexOptions()
public boolean hasDocValues()
public FieldInfo.DocValuesType getDocValuesType()
FieldInfo.DocValuesType
of the docValues. this may be null if the field has no docvalues.
public void setDocValuesGen(long dvGen)
public long getDocValuesGen()
public FieldInfo.DocValuesType getNormType()
FieldInfo.DocValuesType
of the norm. this may be null if the field has no norms.
public boolean omitsNorms()
public boolean hasNorms()
public boolean isIndexed()
public boolean hasPayloads()
public boolean hasVectors()
public String getAttribute(String key)
public String putAttribute(String key, String value)
This is a key-value mapping for the field that the codec can use
to store additional metadata, and will be available to the codec
when reading the segment via getAttribute(String)
If a value already exists for the field, it will be replaced with the new value.
public Map<String,String> attributes()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |