Module org.elasticsearch.server
Class DenseVectorDocValuesField
java.lang.Object
org.elasticsearch.script.field.AbstractScriptFieldFactory<DenseVector>
org.elasticsearch.script.field.vectors.DenseVectorDocValuesField
- All Implemented Interfaces:
Iterable<DenseVector>,ScriptDocValues.Supplier<org.apache.lucene.util.BytesRef>,DenseVectorScriptDocValues.DenseVectorSupplier,DocValuesScriptFieldFactory,Field<DenseVector>,ScriptFieldFactory
- Direct Known Subclasses:
BinaryDenseVectorDocValuesField,ByteBinaryDenseVectorDocValuesField,ByteKnnDenseVectorDocValuesField,KnnDenseVectorDocValuesField
public abstract class DenseVectorDocValuesField
extends AbstractScriptFieldFactory<DenseVector>
implements Field<DenseVector>, DocValuesScriptFieldFactory, DenseVectorScriptDocValues.DenseVectorSupplier
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final DenseVectorFieldMapper.ElementTypeprotected final String -
Constructor Summary
ConstructorsConstructorDescriptionDenseVectorDocValuesField(String name, DenseVectorFieldMapper.ElementType elementType) -
Method Summary
Modifier and TypeMethodDescriptionabstract DenseVectorget()Get the DenseVector for a document if one exists, DenseVector.EMPTY otherwiseabstract DenseVectorget(DenseVector defaultValue) getName()Returns the name of this field.iterator()intsize()Returns the number of values this field has.abstract DenseVectorScriptDocValuesReturns aScriptDocValuesof the appropriate type for this field.Methods inherited from class org.elasticsearch.script.field.AbstractScriptFieldFactory
toScriptFieldMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.index.mapper.vectors.DenseVectorScriptDocValues.DenseVectorSupplier
getInternal, getInternalMethods inherited from interface org.elasticsearch.script.field.DocValuesScriptFieldFactory
setNextDocIdMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.elasticsearch.index.fielddata.ScriptDocValues.Supplier
setNextDocIdMethods inherited from interface org.elasticsearch.script.field.ScriptFieldFactory
toScriptField
-
Field Details
-
name
-
elementType
-
-
Constructor Details
-
DenseVectorDocValuesField
-
-
Method Details
-
getName
Description copied from interface:FieldReturns the name of this field.- Specified by:
getNamein interfaceField<DenseVector>
-
getElementType
-
size
public int size()Description copied from interface:FieldReturns the number of values this field has.- Specified by:
sizein interfaceField<DenseVector>- Specified by:
sizein interfaceScriptDocValues.Supplier<org.apache.lucene.util.BytesRef>
-
get
Get the DenseVector for a document if one exists, DenseVector.EMPTY otherwise -
get
-
toScriptDocValues
Description copied from interface:DocValuesScriptFieldFactoryReturns aScriptDocValuesof the appropriate type for this field. This is used to support backwards compatibility for accessing field values through thedocvariable.- Specified by:
toScriptDocValuesin interfaceDocValuesScriptFieldFactory
-
iterator
- Specified by:
iteratorin interfaceIterable<DenseVector>
-