LocalVectorStore class

Local SQLite vector store for on-device semantic search.

Uses sqlite-vec for vector similarity search on cached content chunks. Chunks are synced from Supabase and stored locally for offline access.

Constructors

LocalVectorStore()

Properties

hashCode int
The hash code for this object.
no setterinherited
isReady bool
Whether the database is open and ready.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearAll() → void
Remove all cached data.
clearTopic(String topicId) → void
Remove all cached data for a topic.
dispose() → void
Close the database.
hasTopicCached(String topicId) bool
Check whether a topic's chunks are cached locally.
hasTopicEmbeddings(String topicId) bool
Check whether a topic's chunks have embeddings locally.
initialize() Future<void>
Open (or create) the local database and load the vector extension.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
searchSimilar(List<double> queryEmbedding, {String? topicId, int limit = 8, double threshold = 0.3}) List<ContentChunkModel>
Search for chunks similar to queryEmbedding within a topic.
toString() String
A string representation of this object.
inherited
upsertChunks(List<ContentChunkModel> chunks, List<List<double>> embeddings) → void
Store chunks with their embeddings locally.

Operators

operator ==(Object other) bool
The equality operator.
inherited