Vector Store
Description
Vector store providers register through IFlexVectorStore. Your application code stays provider-agnostic while the selected provider handles storage, indexing, and similarity search.
Infrastructure arrangement
When you add a vector store provider through Flex Studio, Flex generates the provider infrastructure and configuration:
Provider files under
Infrastructure/Providers/{YourApplication}.DataStoreProviders/Vector/{Provider}/Default configuration under
Application/EndPoints/{YourApplication}.EndPoint.CommonConfigs/AppSettings/DataStores/Vector/{Provider}.json
Flex auto-wires generated Queries/Handlers/Plugins that use IFlexVectorStore—you only register the provider.
Configuration in DI
Register only the provider vector store you need.
// Example: Azure AI Search (options-bound provider)
var section = configuration.GetSection("FlexBase:DataStores:Vector:AzureAISearch");
services.AddFlexAzureAISearchVectorStore(options => section.Bind(options));
// Example: SQL Server / pgvector (parameter-based providers)
// var section = configuration.GetSection("FlexBase:DataStores:Vector:SqlServer");
// services.AddFlexSqlServerVectorStore(
// connectionString: section.GetValue<string>("ConnectionString")!,
// tableName: section.GetValue<string>("TableName")!,
// dimensions: section.GetValue<int?>("Dimensions") ?? 1536);appsettings.json
Vector store configuration is read from FlexBase:DataStores:Vector:<Provider>.
Sample usage ({YourApplication})
Provider pages
SQL Server:
vector-store/sql-server-vector.mdAzure AI Search:
vector-store/azure-ai-search.mdpgvector (PostgreSQL):
vector-store/pg-vector-postgres.mdOpenSearch:
vector-store/open-search.md
Provider considerations
Dimensionsmust match the embedding model you use.Keep secrets (API keys/connection strings) out of source control.
For hybrid retrieval, combine Vector Store (semantic) + Full-Text Search (keyword/filtering).
Last updated