Class TableColumnDefinitionVector
java.lang.Object
com.datastax.astra.client.tables.definition.columns.TableColumnDefinition
com.datastax.astra.client.tables.definition.columns.TableColumnDefinitionVector
Represents a column definition for vector-based data.
Extends
TableColumnDefinition 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
ConstructorsConstructorDescriptionConstructs a newColumnDefinitionVectorinstance with the column type set toTableColumnTypes.VECTOR. -
Method Summary
Modifier and TypeMethodDescriptiondimension(int dimension) Sets the dimension of the vector 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.TableColumnDefinition
toString
-
Constructor Details
-
TableColumnDefinitionVector
public TableColumnDefinitionVector()Constructs a newColumnDefinitionVectorinstance with the column type set toTableColumnTypes.VECTOR.
-
-
Method Details
-
dimension
Sets the dimension of the vector and returns the updated instance.- Parameters:
dimension- the dimension of the vector- Returns:
- this
ColumnDefinitionVectorinstance
-
service
Sets the vectorization service options and returns the updated instance.- Parameters:
service- the vectorization service options- Returns:
- this
ColumnDefinitionVectorinstance
-