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
- Direct Known Subclasses:
BitBinaryDenseVectorDocValuesField
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected final intprotected final org.apache.lucene.index.BinaryDocValuesprotected org.apache.lucene.util.BytesRefprotected final byte[]Fields inherited from class org.elasticsearch.script.field.vectors.DenseVectorDocValuesField
elementType, name -
Constructor Summary
ConstructorsConstructorDescriptionByteBinaryDenseVectorDocValuesField(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) protected DenseVectorbooleanisEmpty()Returnstrueif this field has no values, otherwisefalse.voidsetNextDocId(int docId) Set the current document ID.Returns aScriptDocValuesof the appropriate type for this field.Methods inherited from class org.elasticsearch.script.field.vectors.DenseVectorDocValuesField
getElementType, getName, iterator, sizeMethods 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
getInternalMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.elasticsearch.script.field.ScriptFieldFactory
toScriptField
-
Field Details
-
input
protected final org.apache.lucene.index.BinaryDocValues input -
dims
protected final int dims -
vectorValue
protected final byte[] vectorValue -
decoded
protected boolean decoded -
value
protected org.apache.lucene.util.BytesRef value
-
-
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:DocValuesScriptFieldFactorySet the current document ID.- Throws:
IOException
-
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- Specified by:
toScriptDocValuesin classDenseVectorDocValuesField
-
isEmpty
public boolean isEmpty()Description copied from interface:FieldReturnstrueif this field has no values, otherwisefalse. -
getVector
-
get
Description copied from class:DenseVectorDocValuesFieldGet the DenseVector for a document if one exists, DenseVector.EMPTY otherwise- Specified by:
getin classDenseVectorDocValuesField
-
get
- Specified by:
getin classDenseVectorDocValuesField
-
getInternal
-