Module org.elasticsearch.server
Class DenseVectorFieldMapper
java.lang.Object
org.elasticsearch.index.mapper.Mapper
org.elasticsearch.index.mapper.FieldMapper
org.elasticsearch.index.mapper.vectors.DenseVectorFieldMapper
- All Implemented Interfaces:
- Cloneable,- Iterable<Mapper>,- ToXContent,- ToXContentFragment
A 
FieldMapper for indexing a dense vector of floats.- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classstatic final classNested classes/interfaces inherited from class org.elasticsearch.index.mapper.FieldMapperFieldMapper.Conflicts, FieldMapper.CopyTo, FieldMapper.MergeValidator<T>, FieldMapper.MultiFields, FieldMapper.Parameter<T>, FieldMapper.Serializer<T>, FieldMapper.SerializerCheck<T>, FieldMapper.TypeParserNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContentToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Stringstatic shortstatic final FieldMapper.TypeParserFields inherited from class org.elasticsearch.index.mapper.FieldMapperCOERCE_SETTING, copyTo, hasScript, IGNORE_MALFORMED_SETTING, mappedFieldType, multiFields, onScriptErrorFields inherited from interface org.elasticsearch.xcontent.ToXContentEMPTY_PARAMS
- 
Method SummaryModifier and TypeMethodDescriptionprotected StringvoiddoValidate(MappingLookup mappers) org.apache.lucene.codecs.KnnVectorsFormatReturns aFieldMapper.Builderto be used for merging and serialization Implement as follows:return new MyBuilder(simpleName()).init(this);voidparse(DocumentParserContext context) Parse the field value using the providedDocumentParserContext.protected voidparseCreateField(DocumentParserContext context) Parse the field value and populate the fields onDocumentParserContext.doc().booleanWhether this mapper can handle an array value during document parsing.Methods inherited from class org.elasticsearch.index.mapper.FieldMappercheckIncomingMergeType, copyTo, doXContentBody, executeScript, hasScript, indexAnalyzers, indexScriptValues, iterator, merge, multiFields, name, notInMultiFields, toXContent, typeName, validateMethods inherited from class org.elasticsearch.index.mapper.MapperinternFieldName, simpleName, syntheticFieldLoader, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliteratorMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragmentisFragment
- 
Field Details- 
CONTENT_TYPE- See Also:
 
- 
MAX_DIMS_COUNTpublic static short MAX_DIMS_COUNT
- 
PARSER
 
- 
- 
Method Details- 
fieldType- Overrides:
- fieldTypein class- FieldMapper
 
- 
parsesArrayValuepublic boolean parsesArrayValue()Description copied from class:FieldMapperWhether this mapper can handle an array value during document parsing. If true, when an array is encountered during parsing, the document parser will pass the whole array to the mapper. If false, the array is split into individual values and each value is passed to the mapper for parsing.- Overrides:
- parsesArrayValuein class- FieldMapper
 
- 
parseDescription copied from class:FieldMapperParse the field value using the providedDocumentParserContext.- Overrides:
- parsein class- FieldMapper
- Throws:
- IOException
 
- 
parseCreateFieldDescription copied from class:FieldMapperParse the field value and populate the fields onDocumentParserContext.doc(). Implementations of this method should ensure that on failing to parse parser.currentToken() must be the current failing token- Specified by:
- parseCreateFieldin class- FieldMapper
 
- 
contentType- Specified by:
- contentTypein class- FieldMapper
 
- 
getMergeBuilderDescription copied from class:FieldMapperReturns aFieldMapper.Builderto be used for merging and serialization Implement as follows:return new MyBuilder(simpleName()).init(this);- Specified by:
- getMergeBuilderin class- FieldMapper
 
- 
doValidate- Overrides:
- doValidatein class- FieldMapper
 
- 
getKnnVectorsFormatForFieldpublic org.apache.lucene.codecs.KnnVectorsFormat getKnnVectorsFormatForField()- Returns:
- the custom kNN vectors format that is configured for this field or
 nullif the default format should be used.
 
 
-