Changesets · Branches · Tags · Compare
| Changeset | 3cf2411409021d7e85d0e2a7fea3f4e0ea7cd820cc85a30511021856a5ac6e2d |
|---|---|
| Author | Dallin Romney <dallinromney@gmail.com> · 2025-07-02 14:01 -07:00 |
| Committer | GitHub <noreply@github.com> · 2025-07-02 14:01 -07:00 |
| Parents | c1ef065f0bc4, cd9d848fee39 |
1 file changed
modified core/indexing/docs/DocsService.ts +0 −10
| @@ -981,17 +981,11 @@ | ||
| 981 | 981 | // Otherwise sync the index based on config changes |
| 982 | 982 | const oldConfigDocs = oldConfig?.docs || []; |
| 983 | 983 | const newConfigDocs = newConfig.docs || []; |
| 984 | - const newConfigStartUrls = newConfigDocs.map((doc) => doc.startUrl); | |
| 985 | 984 | |
| 986 | 985 | // NOTE since listMetadata filters by embeddings provider id embedding model changes are accounted for here |
| 987 | 986 | const currentlyIndexedDocs = await this.listMetadata(); |
| 988 | 987 | const currentStartUrls = currentlyIndexedDocs.map((doc) => doc.startUrl); |
| 989 | 988 | |
| 990 | - // Anything found in sqlite but not in new config should be deleted | |
| 991 | - const deletedDocs = currentlyIndexedDocs.filter( | |
| 992 | - (doc) => !newConfigStartUrls.includes(doc.startUrl), | |
| 993 | - ); | |
| 994 | - | |
| 995 | 989 | // Anything found in old config, new config, AND sqlite that doesn't match should be reindexed |
| 996 | 990 | // TODO if only favicon and title change, only update, don't embed |
| 997 | 991 | // Otherwise anything found in new config that isn't in sqlite should be added/indexed |
| @@ -1038,10 +1032,6 @@ | ||
| 1038 | 1032 | ...changedDocs.map((doc) => this.indexAndAdd(doc, true)), |
| 1039 | 1033 | ...addedDocs.map((doc) => this.indexAndAdd(doc)), |
| 1040 | 1034 | ]); |
| 1041 | - | |
| 1042 | - for (const doc of deletedDocs) { | |
| 1043 | - await this.deleteIndexes(doc.startUrl); | |
| 1044 | - } | |
| 1045 | 1035 | } catch (e) { |
| 1046 | 1036 | console.error("Error syncing docs index on config update", e); |
| 1047 | 1037 | } finally { |