diff options
| author | kamtschatka <sschatka@gmail.com> | 2024-06-09 20:11:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-09 19:11:23 +0100 |
| commit | 546139e82f151b35d6492b7cbf2ac89dbfd5d0b5 (patch) | |
| tree | aa966a810f68ec79afbb4fd606adaa6bd49538e3 /packages/trpc/routers/admin.ts | |
| parent | be1bb388924f4422058099dcb0debdd1c857d36a (diff) | |
| download | karakeep-546139e82f151b35d6492b7cbf2ac89dbfd5d0b5.tar.zst | |
fix: Trigger search re-index on bookmark tag manual updates. Fixes #208 (#210)
* re-index of database is not scanning all places when bookmark tags are changed. Manual indexing is working as workaround #208
introduced a new function to trigger a reindex to reduce copy/paste
added missing reindexes when tags are deleted/bookmarks are updated
* give functions a bit more descriptive name
---------
Co-authored-by: kamtschatka <simon.schatka@gmx.at>
Co-authored-by: MohamedBassem <me@mbassem.com>
Diffstat (limited to 'packages/trpc/routers/admin.ts')
| -rw-r--r-- | packages/trpc/routers/admin.ts | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/packages/trpc/routers/admin.ts b/packages/trpc/routers/admin.ts index 0a0af173..05831b92 100644 --- a/packages/trpc/routers/admin.ts +++ b/packages/trpc/routers/admin.ts @@ -6,6 +6,7 @@ import { LinkCrawlerQueue, OpenAIQueue, SearchIndexingQueue, + triggerSearchReindex, } from "@hoarder/shared/queues"; import { adminProcedure, router } from "../index"; @@ -129,13 +130,6 @@ export const adminAppRouter = router({ }, }); - await Promise.all( - bookmarkIds.map((b) => - SearchIndexingQueue.add("search_indexing", { - bookmarkId: b.id, - type: "index", - }), - ), - ); + await Promise.all(bookmarkIds.map((b) => triggerSearchReindex(b.id))); }), }); |
