[PR #2819] [MERGED] Purge cached docs and remove docs from all workspaces on vectorDB/embedder changes #4135

Closed
opened 2026-02-22 18:35:13 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/2819
Author: @shatfield4
Created: 12/12/2024
Status: Merged
Merged: 12/16/2024
Merged by: @timothycarambat

Base: masterHead: 2745-bugfeat-delete-documents-under-my-documents-after-changing-the-embedding-model


📝 Commits (10+)

  • 2bafbb4 wip remove all docs clear vector db on embedder/vector db change
  • 6972fd8 purge all cached docs and remove docs from workspaces on vectordb/embedder change
  • 5135fae lint
  • c1e22a3 Merge branch 'master' into 2745-bugfeat-delete-documents-under-my-documents-after-changing-the-embedding-model
  • 1b18f0f remove unneeded console log
  • 687b4ba Merge branch 'master' into 2745-bugfeat-delete-documents-under-my-documents-after-changing-the-embedding-model
  • 94d1497 remove reset vector stores endpoint and move to server side updateENV with postUpdate check
  • b0a0dfb reset embed module
  • 73afca8 remove unused import
  • 709c763 Merge branch 'master' into 2745-bugfeat-delete-documents-under-my-documents-after-changing-the-embedding-model

📊 Changes

8 files changed (+153 additions, -46 deletions)

View changed files

📝 frontend/src/components/ChangeWarning/index.jsx (+44 -30)
📝 frontend/src/pages/GeneralSettings/EmbeddingPreference/index.jsx (+1 -1)
📝 frontend/src/pages/GeneralSettings/VectorDatabase/index.jsx (+1 -1)
📝 server/models/vectors.js (+22 -12)
📝 server/utils/files/index.js (+11 -0)
📝 server/utils/helpers/index.js (+3 -2)
📝 server/utils/helpers/updateENV.js (+23 -0)
server/utils/vectorStore/resetAllVectorStores.js (+48 -0)

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #2745

What is in this change?

  • When changing embedding models or vector databases, this causes mismatching of vector dimensions
  • This change clears the vector db of all vectors and purges all cached documents to allow for re-embedding to improve the UX for users testing multiple vectorDBs and embedding models
  • Improved WarningModal component to appear more destructive to the user and match styles of other modals around the app

Additional Information

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/2819 **Author:** [@shatfield4](https://github.com/shatfield4) **Created:** 12/12/2024 **Status:** ✅ Merged **Merged:** 12/16/2024 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `2745-bugfeat-delete-documents-under-my-documents-after-changing-the-embedding-model` --- ### 📝 Commits (10+) - [`2bafbb4`](https://github.com/Mintplex-Labs/anything-llm/commit/2bafbb40f6d03320b50bcc5377ee5936830789be) wip remove all docs clear vector db on embedder/vector db change - [`6972fd8`](https://github.com/Mintplex-Labs/anything-llm/commit/6972fd8cff0ab117115a70cdf5347e7f3b237c9f) purge all cached docs and remove docs from workspaces on vectordb/embedder change - [`5135fae`](https://github.com/Mintplex-Labs/anything-llm/commit/5135faeb5846e3c48143fade4b1ee9ab378e8d58) lint - [`c1e22a3`](https://github.com/Mintplex-Labs/anything-llm/commit/c1e22a3252f0e12ddba41199756d3a6bca8b954c) Merge branch 'master' into 2745-bugfeat-delete-documents-under-my-documents-after-changing-the-embedding-model - [`1b18f0f`](https://github.com/Mintplex-Labs/anything-llm/commit/1b18f0fc9bb6fe92396299025061fa7ec2be455e) remove unneeded console log - [`687b4ba`](https://github.com/Mintplex-Labs/anything-llm/commit/687b4badd027d3c6e08bd5cdbd262ec73c990f4b) Merge branch 'master' into 2745-bugfeat-delete-documents-under-my-documents-after-changing-the-embedding-model - [`94d1497`](https://github.com/Mintplex-Labs/anything-llm/commit/94d1497f624dbd1ad0e1a3953ec4b5759ad4188a) remove reset vector stores endpoint and move to server side updateENV with postUpdate check - [`b0a0dfb`](https://github.com/Mintplex-Labs/anything-llm/commit/b0a0dfb688433eb74e992e14c67e01045d3104c0) reset embed module - [`73afca8`](https://github.com/Mintplex-Labs/anything-llm/commit/73afca8209501d4f639c7a46e764f664afbaa3eb) remove unused import - [`709c763`](https://github.com/Mintplex-Labs/anything-llm/commit/709c7632653ed1c90888c4a213ece2fc326277ef) Merge branch 'master' into 2745-bugfeat-delete-documents-under-my-documents-after-changing-the-embedding-model ### 📊 Changes **8 files changed** (+153 additions, -46 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/ChangeWarning/index.jsx` (+44 -30) 📝 `frontend/src/pages/GeneralSettings/EmbeddingPreference/index.jsx` (+1 -1) 📝 `frontend/src/pages/GeneralSettings/VectorDatabase/index.jsx` (+1 -1) 📝 `server/models/vectors.js` (+22 -12) 📝 `server/utils/files/index.js` (+11 -0) 📝 `server/utils/helpers/index.js` (+3 -2) 📝 `server/utils/helpers/updateENV.js` (+23 -0) ➕ `server/utils/vectorStore/resetAllVectorStores.js` (+48 -0) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [x] ✨ feat - [ ] 🐛 fix - [ ] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues <!-- Use "resolves #xxx" to auto resolve on merge. Otherwise, please use "connect #xxx" --> resolves #2745 ### What is in this change? <!-- Describe the changes in this PR that are impactful to the repo. --> - When changing embedding models or vector databases, this causes mismatching of vector dimensions - This change clears the vector db of all vectors and purges all cached documents to allow for re-embedding to improve the UX for users testing multiple vectorDBs and embedding models - Improved `WarningModal` component to appear more destructive to the user and match styles of other modals around the app ### Additional Information <!-- Add any other context about the Pull Request here that was not captured above. --> ### Developer Validations <!-- All of the applicable items should be checked. --> - [x] I ran `yarn lint` from the root of the repo & committed changes - [x] Relevant documentation has been updated - [x] I have tested my code functionality - [x] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:35:13 -05:00
yindo closed this issue 2026-02-22 18:35:13 -05:00
yindo changed title from [PR #2819] Purge cached docs and remove docs from all workspaces on vectorDB/embedder changes to [PR #2819] [MERGED] Purge cached docs and remove docs from all workspaces on vectorDB/embedder changes 2026-06-05 15:17:00 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#4135