docs: update algolia plugin next.js details (#5807)

This commit is contained in:
Shahed Nasser
2023-12-05 15:49:52 +02:00
committed by GitHub
parent 892d737c1f
commit a458cd144d
2 changed files with 7 additions and 8 deletions
@@ -125,7 +125,10 @@ const plugins = [
searchableAttributes, searchableAttributes,
attributesToRetrieve, attributesToRetrieve,
}, },
transformer, transformer: (product) => ({
objectID: product.id,
// other attributes...
}),
}, },
}, },
}, },
@@ -176,10 +179,6 @@ const plugins = [
"images", "images",
], ],
}, },
transformer: (product) => ({
objectID: product.id,
// other attributes...
}),
}, },
}, },
}, },
@@ -280,11 +279,11 @@ If you run your Next.js Starter Template now while the Medusa backend is running
:::note :::note
To make sure the Next.js Starter Template properly displays the products in the search result, include in the `attributesToRetrieve` setting of the Algolia plugin on the Medusa backend at least the fields `title`, `handle`, `description`, and `thumbnail`. To make sure the Next.js Starter Template properly displays the products in the search result, include in the `attributesToRetrieve` setting of the Algolia plugin on the Medusa backend at least the fields `id`, `title`, `handle`, `description`, and `thumbnail`.
::: :::
![Search pop up in the Next.js Starter Template](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000082/Medusa%20Docs/Algolia/1f9qqK6_c0z8zi.png) ![Search Result on Next.js Starter Storefront](https://res.cloudinary.com/dza7lstvk/image/upload/v1701112725/Medusa%20Docs/Screenshots/Screenshot_2023-11-27_at_7.18.09_PM_iozjt0.png)
### Add to Other Storefronts ### Add to Other Storefronts
@@ -250,7 +250,7 @@ To make sure the Next.js Starter Template properly displays the products in the
::: :::
![Search Result on Next.js Starter Template](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000298/Medusa%20Docs/MeiliSearch/gQVWvH2_datei5.png) ![Search Result on Next.js Starter Storefront](https://res.cloudinary.com/dza7lstvk/image/upload/v1701112725/Medusa%20Docs/Screenshots/Screenshot_2023-11-27_at_7.18.09_PM_iozjt0.png)
### Add to Other Storefronts ### Add to Other Storefronts