aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workers
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-07-06 22:53:49 +0000
committerMohamed Bassem <me@mbassem.com>2025-07-06 22:53:49 +0000
commitf5a674c2fd323bcf59a18703faae080856037922 (patch)
tree75535c2e3fcbec1ca0e127f9aa11ed4cfd102e35 /apps/workers
parentf3b925ad715d1d5f0a8f0f98febe5f5ba5c5111f (diff)
downloadkarakeep-f5a674c2fd323bcf59a18703faae080856037922.tar.zst
fix: Fix search indexing after content split
Diffstat (limited to 'apps/workers')
-rw-r--r--apps/workers/workers/searchWorker.ts11
1 files changed, 4 insertions, 7 deletions
diff --git a/apps/workers/workers/searchWorker.ts b/apps/workers/workers/searchWorker.ts
index 177ca0db..74fcfc42 100644
--- a/apps/workers/workers/searchWorker.ts
+++ b/apps/workers/workers/searchWorker.ts
@@ -76,12 +76,6 @@ async function runIndex(
throw new Error(`Bookmark ${bookmarkId} not found`);
}
- // Extract plain text content from HTML for search indexing
- const content = await Bookmark.getBookmarkPlainTextContent(
- bookmark.link,
- bookmark.userId,
- );
-
const task = await searchClient.addDocuments(
[
{
@@ -92,7 +86,10 @@ async function runIndex(
url: bookmark.link.url,
linkTitle: bookmark.link.title,
description: bookmark.link.description,
- content,
+ content: await Bookmark.getBookmarkPlainTextContent(
+ bookmark.link,
+ bookmark.userId,
+ ),
publisher: bookmark.link.publisher,
author: bookmark.link.author,
datePublished: bookmark.link.datePublished,