Medusa plugins
E
Elasticsearch plugin
Plugin para operaciones sobre elasticsearch.
npm install medusa-elasticsearch-plugin
Category
other
Built by
qbk
Type
unknown
Last updated
1 month ago
Monthly downloads
38
Medusa v2: Elasticsearch Plugin
This directory holds the code for the Elasticsearch Plugin.
Prerequisites
Installation
- In your Medusa application, run the following command to install the plugin:
yarn add medusa-elasticsearch-plugin # or npm install medusa-elasticsearch-plugin
- Add the plugin to the array in :
module.exports = defineConfig({// ...plugins: [{resolve: "medusa-elasticsearch-plugin",options: {clientUrl: process.env.ELASTICSEARCH_NODE,clientUser: process.env.ELASTIC_USER,clientPassword: process.env.ELASTIC_PASSWORD,indexName: "products",}}]})
- Add the following properties in your .env file:
ELASTICSEARCH_NODE=ELASTIC_USER=ELASTIC_PASSWORD=
To this moment, you must have a running elasticsearch instance that requires basic authentication with username and password.
Test it Out
To test out that the plugin is working, you can import this collection Postman APIs documentation into your Postman application and try out the available APIs. You must execute the synchronization of products before anything.