Knowledge bases in the store: collections, grants and chunks kept apart per tenant
Collections owned by an organization, team, project or person; grants that add up down the tree and never cross an organization; chunks in PostgreSQL with pgvector, partitioned by organization, an HNSW index per collection, and row-level security as a second line behind each query's filter. Search fuses nearest-neighbour and full-text ranks. Off on SQLite and without pgvector, saying why. server init and the HA database setup install and enable it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
0a7fb821d8
commit
d35630defe
11 files changed
+1408
-25
No files matched your search
@@ -55,9 +55,13 @@ func OpenPostgres(ctx context.Context, dsn string) (*DB, error) {
|
||||
_ = db.Close()
|
||||
return nil, err
|
||||
}
|
||||
return &DB{
|
||||
s := &DB{
|
||||
raw: db,
|
||||
dialect: PostgresDialect,
|
||||
db: bound{c: PostgresDialect, to: db},
|
||||
}, nil
|
||||
}
|
||||
// Not fatal: a store without pgvector serves everything but knowledge
|
||||
// bases, and says why when somebody asks for one.
|
||||
s.kbErr = s.ensureKnowledge(ctx)
|
||||
return s, nil
|
||||
}
|
||||
Reference in new issue
Block a user