VectorStoreFactory
Factory for creating VectorStore instances.
Supports creating stores from configuration or explicit parameters. Backend selection is based on the provider name.
Currently supported backends:
- "sqlite" - SQLite-based storage (default)
- "pgvector" - PostgreSQL with pgvector extension
- "qdrant" - Qdrant vector database
Future backends (roadmap):
- "milvus" - Milvus vector database
- "pinecone" - Pinecone cloud service
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
VectorStoreFactory.type
Members list
Type members
Classlikes
Configuration for creating a vector store.
Configuration for creating a vector store.
Value parameters
- backend
-
The storage backend to use
- connectionString
-
Connection string (for remote backends)
- options
-
Additional backend-specific options
- path
-
Path to database file (for file-based backends)
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Value members
Concrete methods
Create a vector store from configuration.
Create a vector store from configuration.
Value parameters
- config
-
The store configuration
Attributes
- Returns
-
The vector store or error
Create a vector store from a provider name.
Create a vector store from a provider name.
Value parameters
- connectionString
-
Optional connection string for remote backends
- path
-
Optional path for file-based backends
- provider
-
The provider name (e.g., "sqlite", "pgvector")
Attributes
- Returns
-
The vector store or error
Create an in-memory vector store.
Create an in-memory vector store.
Useful for testing or temporary storage.
Attributes
- Returns
-
The vector store or error
Create a pgvector store with default local settings.
Create a pgvector store with default local settings.
Connects to localhost:5432/postgres with user postgres.
Value parameters
- tableName
-
Table name for vectors (default: "vectors")
Attributes
- Returns
-
The vector store or error
Create a pgvector store with explicit connection settings.
Create a pgvector store with explicit connection settings.
Value parameters
- connectionString
-
JDBC connection string (jdbc:postgresql://...)
- password
-
Database password
- tableName
-
Table name for vectors
- user
-
Database user
Attributes
- Returns
-
The vector store or error
Create a Qdrant store with default local settings.
Create a Qdrant store with default local settings.
Connects to localhost:6333.
Value parameters
- collectionName
-
Collection name (default: "vectors")
Attributes
- Returns
-
The vector store or error
Create a Qdrant store with explicit URL.
Create a Qdrant store with explicit URL.
Value parameters
- collectionName
-
Collection name
- url
-
Qdrant server URL (e.g., http://localhost:6333)
Attributes
- Returns
-
The vector store or error
Create a Qdrant Cloud store.
Create a Qdrant Cloud store.
Value parameters
- apiKey
-
Qdrant API key
- cloudUrl
-
Qdrant cloud URL (e.g., https://xxx.qdrant.io)
- collectionName
-
Collection name (default: "vectors")
Attributes
- Returns
-
The vector store or error
Create a file-based SQLite vector store.
Create a file-based SQLite vector store.
Value parameters
- path
-
Path to the database file
Attributes
- Returns
-
The vector store or error