Using Vector Functions
On this page
SingleStore provides a native vector data type and supports similarity searches over vector data using k-nearest neighbor search (kNN) and indexed Approximate Nearest Neighbor (ANN) search.
Resources
The following resources provide information about SingleStore's vector processing:
-
Vector Type: The native vector data type.
-
Working with Vector Data: Vector similarity search.
-
How to Bulk Load Vectors: Load larger vector data sets using a binary format.
-
Vector Indexing: Indexed Approximate Nearest Neighbor (ANN) vector similarity search.
-
Hybrid Search - Re-ranking and Blending Searches: Combine indexed (ANN) vector similarity search and full-text search.
-
Tuning Vector Indexes and Queries: Adjust the index building and searching parameters to meet your application's needs for query accuracy and performance.
The following functions are available for the vector type:
-
DOT_
PRODUCT: Calculate the dot product of two vectors. -
EUCLIDEAN_
DISTANCE: Calculate the Euclidean distance between two vectors. -
Cosine Similarity and Cosine Distance: Calculate the cosine similarity and distance metrics.
-
SCALAR_
VECTOR_ MUL: Multiply a vector by a scalar value. -
VECTOR_
ADD: Add two vectors. -
VECTOR_
ELEMENTS_ SUM: Sum all the elements in a vector. -
VECTOR_
KTH_ ELEMENT: Find the kth element of a vector. -
VECTOR_
MUL: Multiply two vectors element-wise. -
VECTOR_
NUM_ ELEMENTS: Count the number of elements in a vector. -
VECTOR_
SORT: Sort a vector. -
VECTOR_
SUB: Subtract one vector from a second vector.
Last modified: April 30, 2024