Functions
binaryVector()
binary_vector values.
Example:
| Parameter | Type |
|---|---|
options | VectorOptions |
FieldSpec
bool()
bool values.
Example:
FieldSpec
bytes()
bytes values.
Example:
FieldSpec
f32SparseVector()
f32_sparse_vector values.
Note: Sparse vectors use u32 dimension indices to support dictionaries of up to 2^32 - 1 terms.
Example:
FieldSpec
f32Vector()
f32_vector values.
Example:
| Parameter | Type |
|---|---|
options | VectorOptions |
FieldSpec
float()
float values.
Example:
FieldSpec
i8Vector()
i8_vector values.
Example:
| Parameter | Type |
|---|---|
options | VectorOptions |
FieldSpec
int()
int values.
Example:
FieldSpec
keywordIndex()
keyword_index values.
Example:
FieldIndex
list()
list values.
Example:
| Parameter | Type |
|---|---|
options | ListOptions |
FieldSpec
matrix()
matrix values.
Example:
| Parameter | Type |
|---|---|
options | MatrixOptions |
FieldSpec
multiVectorIndex()
multi_vector_index values.
Example:
| Parameter | Type |
|---|---|
options | MultiVectorIndexOptions |
FieldIndex
semanticIndex()
semantic_index values.
Example:
- model: Embedding model to use for semantic search. Currently supported:
cohere/embed-english-v3cohere/embed-multilingual-v3cohere/embed-v4(default)
- embeddingType: TopK supports the following embedding types for Cohere models:
float32uint8binary
| Parameter | Type |
|---|---|
options? | SemanticIndexOptions |
FieldIndex
text()
text values.
Example:
FieldSpec
u8SparseVector()
u8_sparse_vector values.
Note: Sparse vectors use u32 dimension indices to support dictionaries of up to 2^32 - 1 terms.
Example:
FieldSpec
u8Vector()
u8_vector values.
Example:
| Parameter | Type |
|---|---|
options | VectorOptions |
FieldSpec
vectorIndex()
vector_index values.
Supported metrics:
euclidean(not supported for sparse vectors)cosine(not supported for sparse vectors)dot_product(supported for dense and sparse vectors)hamming(only supported for binary_vector type)
| Parameter | Type |
|---|---|
options | VectorIndexOptions |
FieldIndex
Classes
FieldIndex
Internal
FieldSpec
Internal
Methods
index()
| Parameter | Type |
|---|---|
index | FieldIndex |
FieldSpec
required()
FieldSpec
Interfaces
ListOptions
Options for list field specifications. This struct contains configuration options for list fields, including the type of values the list can contain. Properties| Property | Type | Description |
|---|---|---|
valueType | ListValueType | The type of values the list can contain |
MatrixOptions
Options for matrix field specifications. This struct contains configuration options for matrix fields, including the dimension and value type. Properties| Property | Type | Description |
|---|---|---|
dimension | number | The dimension (number of columns) of the matrix |
valueType | MatrixValueType | The value type of the matrix elements |
MultiVectorIndexOptions
Options for multi-vector index specifications. This struct contains configuration options for multi-vector indexes, including the distance metric to use. PropertiesSemanticIndexOptions
Options for semantic index specifications. This struct contains configuration options for semantic indexes, including the model and embedding type to use. Properties| Property | Type | Description |
|---|---|---|
embeddingType? | EmbeddingDataType | The type of embedding data |
model? | string | The embedding model to use |
VectorIndexOptions
Options for vector index specifications. This struct contains configuration options for vector indexes, including the distance metric to use. Properties| Property | Type | Description |
|---|---|---|
metric | VectorDistanceMetric | The distance metric to use for vector similarity |