test: debug meilisearch

This commit is contained in:
Mar0xy 2023-11-01 00:14:59 +01:00
parent c44b261bef
commit 232ac0d94e
No known key found for this signature in database
GPG Key ID: 56569BBE47D2C828
2 changed files with 6 additions and 0 deletions

View File

@ -819,6 +819,8 @@ export class NoteCreateService implements OnApplicationShutdown {
private index(note: MiNote) { private index(note: MiNote) {
if (note.text == null && note.cw == null) return; if (note.text == null && note.cw == null) return;
console.error('createIndex');
this.searchService.indexNote(note); this.searchService.indexNote(note);
} }

View File

@ -113,6 +113,8 @@ export class SearchService {
if (note.text == null && note.cw == null) return; if (note.text == null && note.cw == null) return;
if (!['home', 'public'].includes(note.visibility)) return; if (!['home', 'public'].includes(note.visibility)) return;
console.error('indexNote');
if (this.meilisearch) { if (this.meilisearch) {
switch (this.meilisearchIndexScope) { switch (this.meilisearchIndexScope) {
case 'global': case 'global':
@ -129,6 +131,8 @@ export class SearchService {
} }
} }
console.error('meilisearchFound');
await this.meilisearchNoteIndex?.addDocuments([{ await this.meilisearchNoteIndex?.addDocuments([{
id: note.id, id: note.id,
createdAt: this.idService.parse(note.id).date.getTime(), createdAt: this.idService.parse(note.id).date.getTime(),