From 8dee322c8dbc053b0dd9903952f595aac912a5f9 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Sun, 14 May 2023 13:41:20 +0200 Subject: [PATCH] feat(server): :sparkles: add tags and tags suggestions to Meilisearch index --- server/pkg/meilisearch/utils.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/pkg/meilisearch/utils.go b/server/pkg/meilisearch/utils.go index 3911a75..48a4170 100644 --- a/server/pkg/meilisearch/utils.go +++ b/server/pkg/meilisearch/utils.go @@ -22,9 +22,10 @@ func getPostDocument(app *pocketbase.PocketBase, post *models.Record) (map[strin for _, f := range files { fileDocuments = append(fileDocuments, map[string]interface{}{ - "id": f.GetString("id"), - "name": f.GetString("name"), - "description": f.GetString("description"), + "id": f.GetString("id"), + "name": f.GetString("name"), + "description": f.GetString("description"), + "tagsSuggestions": f.GetString("tagsSuggestions"), }) } @@ -33,5 +34,6 @@ func getPostDocument(app *pocketbase.PocketBase, post *models.Record) (map[strin "title": post.GetString("title"), "author": author.GetString("username"), "files": fileDocuments, + "tags": post.Get("tags"), }, nil }