Class ColumnDefinitionVector
java.lang.Object
com.datastax.astra.client.tables.definition.columns.ColumnDefinition
com.datastax.astra.client.tables.definition.columns.ColumnDefinitionVector
Represents a column definition for vector-based data.
Extends
ColumnDefinition
to include properties and methods
specific to vector data such as dimension, similarity metric, and vectorization service.
This class facilitates the configuration of vector columns in a data schema.
Example usage:
ColumnDefinitionVector vectorColumn = new ColumnDefinitionVector()
.dimension(128)
.metric(SimilarityMetric.COSINE);
-
Constructor Summary
ConstructorDescriptionConstructs a newColumnDefinitionVector
instance with the column type set toColumnTypes.VECTOR
. -
Method Summary
Modifier and TypeMethodDescriptiondimension
(int dimension) Sets the dimension of the vector and returns the updated instance.Sets the similarity metric for vector comparison and returns the updated instance.service
(VectorServiceOptions service) Sets the vectorization service options and returns the updated instance.Methods inherited from class com.datastax.astra.client.tables.definition.columns.ColumnDefinition
toString
-
Constructor Details
-
ColumnDefinitionVector
public ColumnDefinitionVector()Constructs a newColumnDefinitionVector
instance with the column type set toColumnTypes.VECTOR
.
-
-
Method Details
-
dimension
Sets the dimension of the vector and returns the updated instance.- Parameters:
dimension
- the dimension of the vector- Returns:
- this
ColumnDefinitionVector
instance
-
metric
Sets the similarity metric for vector comparison and returns the updated instance.- Parameters:
m
- the similarity metric- Returns:
- this
ColumnDefinitionVector
instance
-
service
Sets the vectorization service options and returns the updated instance.- Parameters:
service
- the vectorization service options- Returns:
- this
ColumnDefinitionVector
instance
-