From dae4f58e4cdc9ba72b0ffd191cd8c05c9a729968 Mon Sep 17 00:00:00 2001 From: PrivateGER Date: Fri, 26 May 2023 00:04:07 +0200 Subject: [PATCH] Specify primary key --- packages/backend/src/db/meilisearch.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/db/meilisearch.ts b/packages/backend/src/db/meilisearch.ts index d7b89bfc0c..bd0514be01 100644 --- a/packages/backend/src/db/meilisearch.ts +++ b/packages/backend/src/db/meilisearch.ts @@ -138,7 +138,9 @@ export default hasConfig ? { logger.info("Indexing notes in MeiliSearch: " + indexingIDs.join(",")); - return posts.addDocuments(indexingBatch); + return posts.addDocuments(indexingBatch, { + primaryKey: "id" + }); }, serverStats: async () => { let health : Health = await client.health();