Module org.elasticsearch.server
Class ByteRankVectorsDocValuesField
java.lang.Object
org.elasticsearch.script.field.AbstractScriptFieldFactory<RankVectors>
org.elasticsearch.script.field.vectors.RankVectorsDocValuesField
org.elasticsearch.script.field.vectors.ByteRankVectorsDocValuesField
- All Implemented Interfaces:
Iterable<RankVectors>,ScriptDocValues.Supplier<org.apache.lucene.util.BytesRef>,RankVectorsScriptDocValues.RankVectorsSupplier,DocValuesScriptFieldFactory,Field<RankVectors>,ScriptFieldFactory
- Direct Known Subclasses:
BitRankVectorsDocValuesField
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected final intprotected final org.apache.lucene.index.BinaryDocValuesprotected org.apache.lucene.util.BytesRefprotected intprotected org.apache.lucene.util.BytesRefprotected VectorIterator<byte[]> Fields inherited from class org.elasticsearch.script.field.vectors.RankVectorsDocValuesField
elementType, name -
Constructor Summary
ConstructorsConstructorDescriptionByteRankVectorsDocValuesField(org.apache.lucene.index.BinaryDocValues input, org.apache.lucene.index.BinaryDocValues magnitudes, String name, DenseVectorFieldMapper.ElementType elementType, int dims) -
Method Summary
Modifier and TypeMethodDescriptionget()Get the DenseVector for a document if one exists, DenseVector.EMPTY otherwiseget(RankVectors defaultValue) protected RankVectorsbooleanisEmpty()Returnstrueif this field has no values, otherwisefalse.voidsetNextDocId(int docId) Set the current document ID.intsize()Returns the number of values this field has.Returns aScriptDocValuesof the appropriate type for this field.Methods inherited from class org.elasticsearch.script.field.vectors.RankVectorsDocValuesField
getElementType, getName, iteratorMethods 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 java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.elasticsearch.index.mapper.vectors.RankVectorsScriptDocValues.RankVectorsSupplier
getInternalMethods 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 -
numVecs
protected int numVecs -
vectorValue
-
decoded
protected boolean decoded -
value
protected org.apache.lucene.util.BytesRef value -
magnitudesValue
protected org.apache.lucene.util.BytesRef magnitudesValue
-
-
Constructor Details
-
ByteRankVectorsDocValuesField
public ByteRankVectorsDocValuesField(org.apache.lucene.index.BinaryDocValues input, org.apache.lucene.index.BinaryDocValues magnitudes, 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 classRankVectorsDocValuesField
-
getVector
-
get
Description copied from class:RankVectorsDocValuesFieldGet the DenseVector for a document if one exists, DenseVector.EMPTY otherwise- Specified by:
getin classRankVectorsDocValuesField
-
get
- Specified by:
getin classRankVectorsDocValuesField
-
getInternal
-
size
public int size()Description copied from interface:FieldReturns the number of values this field has. -
isEmpty
public boolean isEmpty()Description copied from interface:FieldReturnstrueif this field has no values, otherwisefalse.
-