From 232ac0d94e01ef4c3089ad0be15ae0a6009eba59 Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Wed, 1 Nov 2023 00:14:59 +0100 Subject: [PATCH] test: debug meilisearch --- packages/backend/src/core/NoteCreateService.ts | 2 ++ packages/backend/src/core/SearchService.ts | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index 34c8d4f8b..c452892a3 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -819,6 +819,8 @@ export class NoteCreateService implements OnApplicationShutdown { private index(note: MiNote) { if (note.text == null && note.cw == null) return; + console.error('createIndex'); + this.searchService.indexNote(note); } diff --git a/packages/backend/src/core/SearchService.ts b/packages/backend/src/core/SearchService.ts index ccdee87b1..3c5021392 100644 --- a/packages/backend/src/core/SearchService.ts +++ b/packages/backend/src/core/SearchService.ts @@ -113,6 +113,8 @@ export class SearchService { if (note.text == null && note.cw == null) return; if (!['home', 'public'].includes(note.visibility)) return; + console.error('indexNote'); + if (this.meilisearch) { switch (this.meilisearchIndexScope) { case 'global': @@ -129,6 +131,8 @@ export class SearchService { } } + console.error('meilisearchFound'); + await this.meilisearchNoteIndex?.addDocuments([{ id: note.id, createdAt: this.idService.parse(note.id).date.getTime(),