public static enum DocValues.Type extends Enum<DocValues.Type>
Type
specifies the DocValues
type for a
certain field. A Type
only defines the data type for a field
while the actual implementation used to encode and decode the values depends
on the the DocValuesFormat.docsConsumer(org.apache.lucene.index.PerDocWriteState)
and DocValuesFormat.docsProducer(org.apache.lucene.index.SegmentReadState)
methods.Enum Constant and Description |
---|
BYTES_FIXED_DEREF
A fixed length dereferenced byte[] variant.
|
BYTES_FIXED_SORTED
A fixed length pre-sorted byte[] variant.
|
BYTES_FIXED_STRAIGHT
A fixed length straight byte[].
|
BYTES_VAR_DEREF
A variable length dereferenced byte[].
|
BYTES_VAR_SORTED
A variable length pre-sorted byte[] variant.
|
BYTES_VAR_STRAIGHT
Variable length straight stored byte[] variant.
|
FIXED_INTS_16
A 16 bit signed integer value.
|
FIXED_INTS_32
A 32 bit signed integer value.
|
FIXED_INTS_64
A 64 bit signed integer value.
|
FIXED_INTS_8
A 8 bit signed integer value.
|
FLOAT_32
A 32 bit floating point value.
|
FLOAT_64
A 64 bit floating point value.
|
VAR_INTS
A variable bit signed integer value.
|
Modifier and Type | Method and Description |
---|---|
static DocValues.Type |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DocValues.Type[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DocValues.Type VAR_INTS
PackedInts
to compress the values, as an offset
from the minimum value, as long as the value range
fits into 263-1. Otherwise,
the default implementation falls back to fixed size 64bit
integers (FIXED_INTS_64
).
NOTE: this type uses 0 as the default value without any distinction between provided 0 values during indexing. All documents without an explicit value will use 0 instead. Custom default values must be assigned explicitly.
public static final DocValues.Type FIXED_INTS_8
DocValues.Source
instances of
this type return a byte array from DocValues.Source.getArray()
NOTE: this type uses 0 as the default value without any distinction between provided 0 values during indexing. All documents without an explicit value will use 0 instead. Custom default values must be assigned explicitly.
public static final DocValues.Type FIXED_INTS_16
DocValues.Source
instances of
this type return a short array from DocValues.Source.getArray()
NOTE: this type uses 0 as the default value without any distinction between provided 0 values during indexing. All documents without an explicit value will use 0 instead. Custom default values must be assigned explicitly.
public static final DocValues.Type FIXED_INTS_32
DocValues.Source
instances of
this type return a int array from DocValues.Source.getArray()
NOTE: this type uses 0 as the default value without any distinction between provided 0 values during indexing. All documents without an explicit value will use 0 instead. Custom default values must be assigned explicitly.
public static final DocValues.Type FIXED_INTS_64
DocValues.Source
instances of
this type return a long array from DocValues.Source.getArray()
NOTE: this type uses 0 as the default value without any distinction between provided 0 values during indexing. All documents without an explicit value will use 0 instead. Custom default values must be assigned explicitly.
public static final DocValues.Type FLOAT_32
BYTES_FIXED_STRAIGHT
type. DocValues.Source
instances of
this type return a float array from DocValues.Source.getArray()
NOTE: this type uses 0.0f as the default value without any distinction between provided 0.0f values during indexing. All documents without an explicit value will use 0.0f instead. Custom default values must be assigned explicitly.
public static final DocValues.Type FLOAT_64
BYTES_FIXED_STRAIGHT
type. DocValues.Source
instances of
this type return a double array from DocValues.Source.getArray()
NOTE: this type uses 0.0d as the default value without any distinction between provided 0.0d values during indexing. All documents without an explicit value will use 0.0d instead. Custom default values must be assigned explicitly.
public static final DocValues.Type BYTES_FIXED_STRAIGHT
NOTE: this type uses 0 byte filled byte[] based on the length of the first seen value as the default value without any distinction between explicitly provided values during indexing. All documents without an explicit value will use the default instead.Custom default values must be assigned explicitly.
public static final DocValues.Type BYTES_FIXED_DEREF
NOTE: Fields of this type will not store values for documents without an
explicitly provided value. If a documents value is accessed while no
explicit value is stored the returned BytesRef
will be a 0-length
reference. Custom default values must be assigned explicitly.
public static final DocValues.Type BYTES_VAR_STRAIGHT
NOTE: Fields of this type will not store values for documents without an
explicitly provided value. If a documents value is accessed while no
explicit value is stored the returned BytesRef
will be a 0-length
byte[] reference. Custom default values must be assigned explicitly.
public static final DocValues.Type BYTES_VAR_DEREF
BYTES_FIXED_DEREF
, but allowing each
document's value to be a different length.
NOTE: Fields of this type will not store values for documents without an
explicitly provided value. If a documents value is accessed while no
explicit value is stored the returned BytesRef
will be a 0-length
reference. Custom default values must be assigned explicitly.
public static final DocValues.Type BYTES_VAR_SORTED
BYTES_FIXED_SORTED
, but allowing each
document's value to be a different length.
NOTE: Fields of this type will not store values for documents without an
explicitly provided value. If a documents value is accessed while no
explicit value is stored the returned BytesRef
will be a 0-length
reference.Custom default values must be assigned explicitly.
DocValues.SortedSource
public static final DocValues.Type BYTES_FIXED_SORTED
NOTE: Fields of this type will not store values for documents without an
explicitly provided value. If a documents value is accessed while no
explicit value is stored the returned BytesRef
will be a 0-length
reference. Custom default values must be assigned
explicitly.
DocValues.SortedSource
public static DocValues.Type[] values()
for (DocValues.Type c : DocValues.Type.values()) System.out.println(c);
public static DocValues.Type valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullCopyright © 2000-2013 Apache Software Foundation. All Rights Reserved.