From 6dd305677627ce816368f64995287395974fc57f Mon Sep 17 00:00:00 2001 From: Pedro Tigre <97975218+pedrotigre@users.noreply.github.com> Date: Fri, 11 Aug 2023 18:45:19 -0300 Subject: [PATCH] fix: Update algolia.md (#4734) ## Fix bug where products are not added to Algolia index Previously, the id property was used as the unique identifier for products in the Algolia index. However, Algolia requires the use of the objectID property as the unique identifier. This commit updates the transformer function for the products index to use the objectID property instead of the id property, ensuring that products are properly added to the Algolia index. --- docs/content/plugins/search/algolia.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/plugins/search/algolia.md b/docs/content/plugins/search/algolia.md index 6b3a96e6d9..a9aa450810 100644 --- a/docs/content/plugins/search/algolia.md +++ b/docs/content/plugins/search/algolia.md @@ -177,7 +177,7 @@ const plugins = [ ], }, transformer: (product) => ({ - id: product.id, + objectID: product.id, // other attributes... }), },