From e9fafe9b51c7d485c363f09468d920d1ac06da1e Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Wed, 1 Nov 2023 00:33:29 +0100 Subject: [PATCH] test: debug meilisearch not being found --- packages/backend/src/core/SearchService.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/backend/src/core/SearchService.ts b/packages/backend/src/core/SearchService.ts index 906b918770..1a3c5151be 100644 --- a/packages/backend/src/core/SearchService.ts +++ b/packages/backend/src/core/SearchService.ts @@ -78,7 +78,7 @@ export class SearchService { private idService: IdService, ) { if (meilisearch) { - this.meilisearchNoteIndex = meilisearch.index(`${config.meilisearch!.index}---notes`); + this.meilisearchNoteIndex = meilisearch.index(`${this.config.meilisearch?.index}---notes`); this.meilisearchNoteIndex.updateSettings({ searchableAttributes: [ 'text', @@ -103,8 +103,8 @@ export class SearchService { }); } - if (config.meilisearch?.scope) { - this.meilisearchIndexScope = config.meilisearch.scope; + if (this.config.meilisearch?.scope) { + this.meilisearchIndexScope = this.config.meilisearch.scope; } } @@ -113,8 +113,6 @@ export class SearchService { if (note.text == null && note.cw == null) return; if (!['home', 'public'].includes(note.visibility)) return; - console.error(note); - if (this.meilisearch) { switch (this.meilisearchIndexScope) { case 'global':