Migrating search providers
Database → external index
- Deploy Elasticsearch, OpenSearch, or Azure AI Search.
- Set
Feed:Search:TypetoElasticsearch,OpenSearch, orAzureSearchand configure provider settings. - Restart the feed. Background reconciliation indexes every listed package whose
IndexedWithis null or not equal to the new indexer key. - The API remains available during reconciliation; expect partial search results until reconciliation completes.
Existing IndexedWith values are typically null or Null from database search, so all packages are selected on the first run.
Switching external providers
Changing Search.Type from e.g. Elasticsearch to AzureSearch changes the active indexer key. Packages with IndexedWith = Elasticsearch are reindexed because the key no longer matches.
External index → Database
Set Search.Type to Database. Reconciliation stops (NullSearchIndexer). Search queries use SQL again. Old IndexedWith values pointing at external indexers are harmless.
Schema changes
When the search document schema changes, SearchIndexerKeys.CurrentSchemaVersion is bumped. On startup, IndexedWith is cleared for all packages and a full reindex runs once.
Database migration
Apply EF migrations so Packages.IndexedWith and SearchIndexStates exist:
dotnet ef database update --context SqliteContext --project src/AvantiPoint.Packages.Database.Sqlite
Use the context for your database provider (SqlServer, PostgreSql, MySql).