Module org.elasticsearch.server
Class DenseVectorScriptDocValues
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<T>
org.elasticsearch.index.fielddata.ScriptDocValues<org.apache.lucene.util.BytesRef>
org.elasticsearch.index.mapper.vectors.DenseVectorScriptDocValues
- All Implemented Interfaces:
- Iterable<org.apache.lucene.util.BytesRef>,- Collection<org.apache.lucene.util.BytesRef>,- List<org.apache.lucene.util.BytesRef>
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class org.elasticsearch.index.fielddata.ScriptDocValuesScriptDocValues.Booleans, ScriptDocValues.BytesRefs, ScriptDocValues.Dates, ScriptDocValues.Doubles, ScriptDocValues.DoublesSupplier, ScriptDocValues.Geometry<T>, ScriptDocValues.GeometrySupplier<T>, ScriptDocValues.GeoPoints, ScriptDocValues.Longs, ScriptDocValues.Strings, ScriptDocValues.StringsSupplier, ScriptDocValues.Supplier<T>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final DenseVectorScriptDocValues.DenseVectorSupplierstatic final StringFields inherited from class org.elasticsearch.index.fielddata.ScriptDocValuessupplierFields inherited from class java.util.AbstractListmodCount
- 
Constructor SummaryConstructorsConstructorDescriptionDenseVectorScriptDocValues(DenseVectorScriptDocValues.DenseVectorSupplier supplier, int dims) 
- 
Method SummaryModifier and TypeMethodDescriptionintdims()doubledotProduct(float[] queryVector) org.apache.lucene.util.BytesRefget(int index) floatGet dense vector's magnitudefloat[]Get dense vector's value as an array of floatsdoublel1Norm(float[] queryVector) doublel2Norm(float[] queryVector) intsize()Methods inherited from class org.elasticsearch.index.fielddata.ScriptDocValuesadd, getSupplier, remove, replaceAll, set, sort, throwIfEmptyMethods inherited from class java.util.AbstractListadd, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, subListMethods inherited from class java.util.AbstractCollectionaddAll, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.CollectionparallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.ListaddAll, contains, containsAll, isEmpty, removeAll, retainAll, spliterator, toArray, toArray
- 
Field Details- 
MISSING_VECTOR_FIELD_MESSAGE- See Also:
 
- 
dvSupplier
 
- 
- 
Constructor Details- 
DenseVectorScriptDocValuespublic DenseVectorScriptDocValues(DenseVectorScriptDocValues.DenseVectorSupplier supplier, int dims) 
 
- 
- 
Method Details- 
dimspublic int dims()
- 
getVectorValuepublic float[] getVectorValue()Get dense vector's value as an array of floats
- 
getMagnitudepublic float getMagnitude()Get dense vector's magnitude
- 
dotProductpublic double dotProduct(float[] queryVector) 
- 
l1Normpublic double l1Norm(float[] queryVector) 
- 
l2Normpublic double l2Norm(float[] queryVector) 
- 
getpublic org.apache.lucene.util.BytesRef get(int index) - Specified by:
- getin interface- List<org.apache.lucene.util.BytesRef>
- Specified by:
- getin class- AbstractList<org.apache.lucene.util.BytesRef>
 
- 
sizepublic int size()- Specified by:
- sizein interface- Collection<org.apache.lucene.util.BytesRef>
- Specified by:
- sizein interface- List<org.apache.lucene.util.BytesRef>
- Specified by:
- sizein class- AbstractCollection<org.apache.lucene.util.BytesRef>
 
 
-