From f5a674c2fd323bcf59a18703faae080856037922 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sun, 6 Jul 2025 22:53:49 +0000 Subject: fix: Fix search indexing after content split --- apps/workers/workers/searchWorker.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'apps') 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, -- cgit v1.2.3-70-g09d2