mirror of
https://github.com/immich-app/immich.git
synced 2025-12-22 09:15:34 +03:00
feat: use pgvecto.rs (#3605)
This commit is contained in:
@@ -25,3 +25,10 @@ export const databaseConfig: PostgresConnectionOptions = {
|
||||
|
||||
// this export is used by TypeORM commands in package.json#scripts
|
||||
export const dataSource = new DataSource(databaseConfig);
|
||||
|
||||
export async function enablePrefilter() {
|
||||
if (!dataSource.isInitialized) {
|
||||
await dataSource.initialize();
|
||||
}
|
||||
await dataSource.query(`SET vectors.enable_prefilter = on`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user