public final class FieldInfo extends Object
Modifier and Type | Field and Description |
---|---|
String |
name
Field's name
|
int |
number
Internal field number
|
Constructor and Description |
---|
FieldInfo(String name,
int number,
boolean storeTermVector,
boolean omitNorms,
boolean storePayloads,
IndexOptions indexOptions,
DocValuesType docValues,
long dvGen,
Map<String,String> attributes,
int pointDimensionCount,
int pointNumBytes)
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
attributes()
Returns internal codec attributes map.
|
boolean |
checkConsistency()
Performs internal consistency checks.
|
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.
|
DocValuesType |
getDocValuesType()
Returns
DocValuesType of the docValues; this is
DocValuesType.NONE if the field has no docvalues. |
IndexOptions |
getIndexOptions()
Returns IndexOptions for the field, or IndexOptions.NONE if the field is not indexed
|
int |
getPointDimensionCount()
Return point dimension count
|
int |
getPointNumBytes()
Return number of bytes per dimension
|
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 |
omitsNorms()
Returns true if norms are explicitly omitted for this field
|
String |
putAttribute(String key,
String value)
Puts a codec attribute value.
|
void |
setIndexOptions(IndexOptions newIndexOptions)
Record the
IndexOptions to use with this field. |
void |
setOmitsNorms()
Omit norms for this field.
|
void |
setPointDimensions(int count,
int numBytes)
Record that this field is indexed with points, with the
specified number of dimensions and bytes per dimension.
|
public final String name
public final int number
public FieldInfo(String name, int number, boolean storeTermVector, boolean omitNorms, boolean storePayloads, IndexOptions indexOptions, DocValuesType docValues, long dvGen, Map<String,String> attributes, int pointDimensionCount, int pointNumBytes)
public boolean checkConsistency()
public void setPointDimensions(int count, int numBytes)
public int getPointDimensionCount()
public int getPointNumBytes()
public IndexOptions getIndexOptions()
public void setIndexOptions(IndexOptions newIndexOptions)
IndexOptions
to use with this field.public DocValuesType getDocValuesType()
DocValuesType
of the docValues; this is
DocValuesType.NONE
if the field has no docvalues.public long getDocValuesGen()
public boolean omitsNorms()
public void setOmitsNorms()
public boolean hasNorms()
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.
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.