public final class FieldInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.lang.String> |
attributes |
private DocValuesType |
docValuesType |
private long |
dvGen |
private IndexOptions |
indexOptions |
java.lang.String |
name
Field's name
|
int |
number
Internal field number
|
private boolean |
omitNorms |
private int |
pointDataDimensionCount
If both of these are positive it means this field indexed points
(see
PointsFormat ). |
private int |
pointIndexDimensionCount |
private int |
pointNumBytes |
private boolean |
softDeletesField |
private boolean |
storePayloads |
private boolean |
storeTermVector |
Constructor and Description |
---|
FieldInfo(java.lang.String name,
int number,
boolean storeTermVector,
boolean omitNorms,
boolean storePayloads,
IndexOptions indexOptions,
DocValuesType docValues,
long dvGen,
java.util.Map<java.lang.String,java.lang.String> attributes,
int pointDataDimensionCount,
int pointIndexDimensionCount,
int pointNumBytes,
boolean softDeletesField)
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.String> |
attributes()
Returns internal codec attributes map.
|
boolean |
checkConsistency()
Performs internal consistency checks.
|
java.lang.String |
getAttribute(java.lang.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 |
getPointDataDimensionCount()
Return point data dimension count
|
int |
getPointIndexDimensionCount()
Return point data 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 |
isSoftDeletesField()
Returns true if this field is configured and used as the soft-deletes field.
|
boolean |
omitsNorms()
Returns true if norms are explicitly omitted for this field
|
java.lang.String |
putAttribute(java.lang.String key,
java.lang.String value)
Puts a codec attribute value.
|
(package private) void |
setDocValuesGen(long dvGen)
Sets the docValues generation of this field.
|
void |
setDocValuesType(DocValuesType type)
Record that this field is indexed with docvalues, with the specified type
|
void |
setIndexOptions(IndexOptions newIndexOptions)
Record the
IndexOptions to use with this field. |
void |
setOmitsNorms()
Omit norms for this field.
|
void |
setPointDimensions(int dataDimensionCount,
int indexDimensionCount,
int numBytes)
Record that this field is indexed with points, with the
specified number of dimensions and bytes per dimension.
|
(package private) void |
setStorePayloads() |
(package private) void |
setStoreTermVectors() |
(package private) void |
update(boolean storeTermVector,
boolean omitNorms,
boolean storePayloads,
IndexOptions indexOptions,
java.util.Map<java.lang.String,java.lang.String> attributes,
int dataDimensionCount,
int indexDimensionCount,
int dimensionNumBytes) |
public final java.lang.String name
public final int number
private DocValuesType docValuesType
private boolean storeTermVector
private boolean omitNorms
private IndexOptions indexOptions
private boolean storePayloads
private final java.util.Map<java.lang.String,java.lang.String> attributes
private long dvGen
private int pointDataDimensionCount
PointsFormat
).private int pointIndexDimensionCount
private int pointNumBytes
private final boolean softDeletesField
public FieldInfo(java.lang.String name, int number, boolean storeTermVector, boolean omitNorms, boolean storePayloads, IndexOptions indexOptions, DocValuesType docValues, long dvGen, java.util.Map<java.lang.String,java.lang.String> attributes, int pointDataDimensionCount, int pointIndexDimensionCount, int pointNumBytes, boolean softDeletesField)
public boolean checkConsistency()
void update(boolean storeTermVector, boolean omitNorms, boolean storePayloads, IndexOptions indexOptions, java.util.Map<java.lang.String,java.lang.String> attributes, int dataDimensionCount, int indexDimensionCount, int dimensionNumBytes)
public void setPointDimensions(int dataDimensionCount, int indexDimensionCount, int numBytes)
public int getPointDataDimensionCount()
public int getPointIndexDimensionCount()
public int getPointNumBytes()
public void setDocValuesType(DocValuesType type)
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.void setDocValuesGen(long dvGen)
public long getDocValuesGen()
void setStoreTermVectors()
void setStorePayloads()
public boolean omitsNorms()
public void setOmitsNorms()
public boolean hasNorms()
public boolean hasPayloads()
public boolean hasVectors()
public java.lang.String getAttribute(java.lang.String key)
public java.lang.String putAttribute(java.lang.String key, java.lang.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 key in the field, it will be replaced with the new value. If the value of the attributes for a same field is changed between the documents, the behaviour after merge is undefined.
public java.util.Map<java.lang.String,java.lang.String> attributes()
public boolean isSoftDeletesField()
LiveIndexWriterConfig.softDeletesField