From 2b39d3237579867de7c1b96a63994e3903c865cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20PAILHAREY?= <rpailharey@grandlyon.com>
Date: Fri, 7 Oct 2022 09:15:02 +0000
Subject: [PATCH] fix(meilisearch): display all attributes

---
 internal/models/models.go | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/internal/models/models.go b/internal/models/models.go
index 73adcd0..61d40d7 100644
--- a/internal/models/models.go
+++ b/internal/models/models.go
@@ -83,13 +83,6 @@ func NewDataHandler() *DataHandler {
 	})
 
 	settings := meilisearch.Settings{
-		DisplayedAttributes: []string{
-			"ID",
-			"CreatedAt",
-			"firstname",
-			"lastname",
-			"pointID",
-		},
 		SearchableAttributes: []string{
 			"pointID",
 			"lastname",
@@ -111,6 +104,7 @@ func NewDataHandler() *DataHandler {
 		},
 	}
 
+	meiliClient.Index("consents").ResetSettings()
 	meiliClient.Index("consents").UpdateSettings(&settings)
 
 	return &DataHandler{sqlClient: sqlClient, meiliClient: meiliClient}
-- 
GitLab