Module org.elasticsearch.server
Class ByteBinaryDenseVectorDocValuesField
java.lang.Object
org.elasticsearch.script.field.AbstractScriptFieldFactory<DenseVector>
org.elasticsearch.script.field.vectors.DenseVectorDocValuesField
org.elasticsearch.script.field.vectors.ByteBinaryDenseVectorDocValuesField
- All Implemented Interfaces:
Iterable<DenseVector>
,ScriptDocValues.Supplier<org.apache.lucene.util.BytesRef>
,DenseVectorScriptDocValues.DenseVectorSupplier
,DocValuesScriptFieldFactory
,Field<DenseVector>
,ScriptFieldFactory
-
Field Summary
Fields inherited from class org.elasticsearch.script.field.vectors.DenseVectorDocValuesField
elementType, name
-
Constructor Summary
ConstructorDescriptionByteBinaryDenseVectorDocValuesField
(org.apache.lucene.index.BinaryDocValues input, String name, DenseVectorFieldMapper.ElementType elementType, int dims) -
Method Summary
Modifier and TypeMethodDescriptionget()
Get the DenseVector for a document if one exists, DenseVector.EMPTY otherwiseget
(DenseVector defaultValue) boolean
isEmpty()
Returnstrue
if this field has no values, otherwisefalse
.void
setNextDocId
(int docId) Set the current document ID.Returns aScriptDocValues
of the appropriate type for this field.Methods inherited from class org.elasticsearch.script.field.vectors.DenseVectorDocValuesField
getElementType, getName, iterator, size
Methods inherited from class org.elasticsearch.script.field.AbstractScriptFieldFactory
toScriptField
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.index.mapper.vectors.DenseVectorScriptDocValues.DenseVectorSupplier
getInternal
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.elasticsearch.script.field.ScriptFieldFactory
toScriptField
-
Constructor Details
-
ByteBinaryDenseVectorDocValuesField
public ByteBinaryDenseVectorDocValuesField(org.apache.lucene.index.BinaryDocValues input, String name, DenseVectorFieldMapper.ElementType elementType, int dims)
-
-
Method Details
-
setNextDocId
Description copied from interface:DocValuesScriptFieldFactory
Set the current document ID.- Throws:
IOException
-
toScriptDocValues
Description copied from interface:DocValuesScriptFieldFactory
Returns aScriptDocValues
of the appropriate type for this field. This is used to support backwards compatibility for accessing field values through thedoc
variable.- Specified by:
toScriptDocValues
in interfaceDocValuesScriptFieldFactory
- Specified by:
toScriptDocValues
in classDenseVectorDocValuesField
-
isEmpty
public boolean isEmpty()Description copied from interface:Field
Returnstrue
if this field has no values, otherwisefalse
. -
get
Description copied from class:DenseVectorDocValuesField
Get the DenseVector for a document if one exists, DenseVector.EMPTY otherwise- Specified by:
get
in classDenseVectorDocValuesField
-
get
- Specified by:
get
in classDenseVectorDocValuesField
-
getInternal
-