Module org.elasticsearch.server
Package org.elasticsearch.index.mapper
Class FieldMapper.DocValuesParameter
java.lang.Object
org.elasticsearch.index.mapper.FieldMapper.Parameter<FieldMapper.DocValuesParameter.Values>
org.elasticsearch.index.mapper.FieldMapper.DocValuesParameter
- All Implemented Interfaces:
Supplier<FieldMapper.DocValuesParameter.Values>
- Enclosing class:
FieldMapper
public static final class FieldMapper.DocValuesParameter
extends FieldMapper.Parameter<FieldMapper.DocValuesParameter.Values>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class org.elasticsearch.index.mapper.FieldMapper.Parameter
name -
Method Summary
Modifier and TypeMethodDescriptionarraysWithCardinality(FieldMapper.DocValuesParameter.Values defaultValue, Function<FieldMapper, FieldMapper.DocValuesParameter.Values> initializer) Factory for field types that support cardinality.voidparse(String field, MappingParserContext context, Object value) Parses the doc_values parameter from the field mapping.voidSets the current value of the parametersorted(FieldMapper.DocValuesParameter.Values defaultValue, Function<FieldMapper, FieldMapper.DocValuesParameter.Values> initializer) Factory for field types that do not support cardinality.sortedSet(FieldMapper.DocValuesParameter.Values defaultValue, Function<FieldMapper, FieldMapper.DocValuesParameter.Values> initializer) Factory for field types that do not support cardinality.sortedSetWithCardinality(FieldMapper.DocValuesParameter.Values defaultValue, Function<FieldMapper, FieldMapper.DocValuesParameter.Values> initializer) Factory for field types that support cardinality.protected voidtoXContent(XContentBuilder builder, boolean includeDefaults) Methods inherited from class org.elasticsearch.index.mapper.FieldMapper.Parameter
acceptsNull, addDeprecatedName, addValidator, alwaysSerialize, analyzerParam, analyzerParam, boolParam, boolParam, canAcceptNull, deprecated, docValuesParam, enumParam, enumParam, explicitBoolParam, get, getDefaultValue, getValue, ignoreAboveParam, indexParam, indexParam, indexParam, intParam, isConfigured, isSet, metaParam, neverSerialize, normsParam, normsParam, onScriptErrorParam, precludesParameters, requiresParameter, restrictedEnumParam, restrictedEnumParam, scriptParam, setMergeValidator, setSerializerCheck, storeParam, storeParam, stringArrayParam, stringParam, stringParam, useTimeSeriesDocValuesSkippers
-
Field Details
-
PARAMETER_NAME
- See Also:
-
EXTENDED_DOC_VALUES_PARAMS_FF
-
cardinalityParameter
public final Optional<FieldMapper.Parameter<FieldMapper.DocValuesParameter.Values.Cardinality>> cardinalityParameter -
multiValueParameter
public final FieldMapper.Parameter<FieldMapper.DocValuesParameter.Values.MultiValue> multiValueParameter
-
-
Method Details
-
sorted
public static FieldMapper.DocValuesParameter sorted(FieldMapper.DocValuesParameter.Values defaultValue, Function<FieldMapper, FieldMapper.DocValuesParameter.Values> initializer) Factory for field types that do not support cardinality. Use for numeric types that useSortedNumericDocValuesField. -
sortedSet
public static FieldMapper.DocValuesParameter sortedSet(FieldMapper.DocValuesParameter.Values defaultValue, Function<FieldMapper, FieldMapper.DocValuesParameter.Values> initializer) Factory for field types that do not support cardinality. Use for types that useSortedSetDocValuesField(e.g. IP, flattened). -
sortedSetWithCardinality
public static FieldMapper.DocValuesParameter sortedSetWithCardinality(FieldMapper.DocValuesParameter.Values defaultValue, Function<FieldMapper, FieldMapper.DocValuesParameter.Values> initializer) Factory for field types that support cardinality. Use for keyword fields. -
arraysWithCardinality
public static FieldMapper.DocValuesParameter arraysWithCardinality(FieldMapper.DocValuesParameter.Values defaultValue, Function<FieldMapper, FieldMapper.DocValuesParameter.Values> initializer) Factory for field types that support cardinality. Use for text-family fields (text, match_only_text). -
parse
Parses the doc_values parameter from the field mapping.Doc values can be configured in the following ways:
"doc_values": false- doc_values disabled"doc_values": true- doc_values enabled with defaults"doc_values": { "cardinality": "low" }- doc_values enabled with LOW cardinality"doc_values": { "cardinality": "high" }- doc_values enabled with HIGH cardinality"doc_values": { "multi_value": "no" }- single value enforced per document"doc_values": { "multi_value": "sorted" }- multiple values sorted per document"doc_values": { "multi_value": "sorted_set" }- multiple values sorted and deduplicated per document"doc_values": { "multi_value": "arrays" }- multiple values stored as-is (no sorting or deduplication)
Not all
multi_valueoptions are supported by every field type; unsupported options are rejected at mapping parse time.The presence of
doc_valuesas a map indicates the user wants doc_values enabled. The map format allows specifying additional cardinality and multi_value settings.- Overrides:
parsein classFieldMapper.Parameter<FieldMapper.DocValuesParameter.Values>- Parameters:
field- the field namecontext- the parser contextvalue- the object
-
setValue
Description copied from class:FieldMapper.ParameterSets the current value of the parameter- Overrides:
setValuein classFieldMapper.Parameter<FieldMapper.DocValuesParameter.Values>
-
toXContent
- Overrides:
toXContentin classFieldMapper.Parameter<FieldMapper.DocValuesParameter.Values>- Throws:
IOException
-