Skip to content

Commit

Permalink
Add index on retrieval_document_chunk (#10458)
Browse files Browse the repository at this point in the history
  • Loading branch information
flvndvd authored Feb 1, 2025
1 parent cb71cc3 commit acb9aab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion front/lib/models/assistant/actions/retrieval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,10 @@ RetrievalDocumentChunk.init(
{
modelName: "retrieval_document_chunk",
sequelize: frontSequelize,
indexes: [{ fields: ["retrievalDocumentId"] }],
indexes: [
{ fields: ["retrievalDocumentId"] },
{ fields: ["workspaceId", "id"] },
],
}
);

Expand Down
2 changes: 2 additions & 0 deletions front/migrations/db/migration_166.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Migration created on Feb 01, 2025
CREATE INDEX CONCURRENTLY "retrieval_document_chunks_workspace_id_id" ON "retrieval_document_chunks" ("workspaceId", "id");

0 comments on commit acb9aab

Please sign in to comment.