0.0.20 • Published 7 months ago

medusa-plugin-algolia-extended v0.0.20

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Algolia

Provide powerful indexing and searching features in your commerce application with Algolia.

Medusa Website | Medusa Repository

Features

  • Flexible configurations for specifying searchable and retrievable attributes.
  • Remove draft products from Algolia index
  • Utilize Algolia's powerful search functionalities including typo-tolerance, query suggestions, results ranking, and more.
  • Access Medusa container inside the transfomer function for unlimited possibilities
  • Additional logging, for instance how many documents are sent to Algolia for indexing

Prerequisites


How to Install

1. Run the following command in the directory of the Medusa backend:

npm install medusa-plugin-algolia-extended

2. Set the following environment variables in .env:

ALGOLIA_APP_ID=<YOUR_APP_ID>
ALGOLIA_ADMIN_API_KEY=<YOUR_ADMIN_API_KEY>

3. In medusa-config.js add the following at the end of the plugins array:

const plugins = [
// ...
{
  resolve: `medusa-plugin-algolia`,
  options: {
    applicationId: process.env.ALGOLIA_APP_ID,
    adminApiKey: process.env.ALGOLIA_ADMIN_API_KEY,
    settings: {
      products: {
        indexSettings: {
          searchableAttributes: ["title", "description"],
          attributesToRetrieve: [
            "id",
            "title",
            "description",
            "handle",
            "thumbnail",
            "variants",
            "variant_sku",
            "options",
            "collection_title",
            "collection_handle",
            "images",
          ],
        },
        transformer: async (product, container) => ({
          objectID: product.id,
          // other attributes...
        }),
      },
    },
  },
},
]

Test the Plugin

1. Run the following command in the directory of the Medusa backend to run the backend:

npm run start

Additional Resources

0.0.20

7 months ago

0.0.14

7 months ago

0.0.15

7 months ago

0.0.16

7 months ago

0.0.17

7 months ago

0.0.18

7 months ago

0.0.19

7 months ago

0.0.13

9 months ago

0.0.12

11 months ago

0.0.11

11 months ago

0.0.10

11 months ago

0.0.9

11 months ago

0.0.8

11 months ago

0.0.7

11 months ago

0.0.6

11 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago