v0.1.6 - Metadata columns, Partition keys, and Auxiliary column support
sqlite-vec now supports metadata columns in vec0 virtual tables! Check out the announcement blogpost (Nov 2024) for more information.
You can now declare metadata columns, partition keys, and auxliary columns in a vec0 virtual table:
create virtual table vec_articles using vec0(
article_id integer primary key,
-- Vector text embedding of the `headline` column, with 384 dimensions
headline_embedding float[384],
-- Partition key, internally shard vector index on article published year
year integer partition key,
-- Metadata columns, can appear in `WHERE` clause of KNN queries
news_desk text,
word_count integer,
pub_date text,
-- Auxiliary columns, unindexed but fast lookups
+headline text,
+url text
);
And perform KNN queries with extra WHERE clauses: