In TopK, a vector is represented as a flat array of numbers. To differentiate between various types of vectors, use provided data constructors when inserting or querying vectors: TopK supports the following types of vectors:
If no helper function is used, the vector is assumed to be a float32 vector.
To pass a float32 vector, use the f32_vector()
helper function:
To pass a u8 vector, use the u8_vector()
helper function:
To pass a binary vector, use the binary_vector()
helper function:
To pass a sparse vector with float32 values, use the f32_sparse_vector()
helper function:
To pass a sparse vector with 8-bit unsigned integer values, use the u8_sparse_vector()
helper function:
To pass a byte object, use the bytes()
helper function:
In TopK, a vector is represented as a flat array of numbers. To differentiate between various types of vectors, use provided data constructors when inserting or querying vectors: TopK supports the following types of vectors:
If no helper function is used, the vector is assumed to be a float32 vector.
To pass a float32 vector, use the f32_vector()
helper function:
To pass a u8 vector, use the u8_vector()
helper function:
To pass a binary vector, use the binary_vector()
helper function:
To pass a sparse vector with float32 values, use the f32_sparse_vector()
helper function:
To pass a sparse vector with 8-bit unsigned integer values, use the u8_sparse_vector()
helper function:
To pass a byte object, use the bytes()
helper function: