Create a vector column
Vectors are a data type that is added to a table if vector search will be performed on a column in the table.
Prerequisite
-
Keyspace must exist
Create a table cycling.comments_vs
using a vector
to store the embeddings for vector search.
CREATE TABLE IF NOT EXISTS cycling.comments_vs (
record_id timeuuid,
id uuid,
commenter text,
comment text,
comment_vector VECTOR <FLOAT, 5>,
created_at timestamp,
PRIMARY KEY (id, created_at)
)
WITH CLUSTERING ORDER BY (created_at DESC);