Плагины Medusa
E

Elasticsearch plugin

Plugin para operaciones sobre elasticsearch.

Нужна доработка этого плагина?

Связаться с нами
npm install medusa-elasticsearch-plugin
Категория
other
Создано
qbk
Тип
unknown
Последнее обновление
1 месяц назад
Ежемесячные загрузки
38

Medusa v2: Elasticsearch Plugin

This directory holds the code for the Elasticsearch Plugin.

Prerequisites

Installation

  1. In your Medusa application, run the following command to install the plugin:
yarn add medusa-elasticsearch-plugin # or npm install medusa-elasticsearch-plugin
  1. 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",
}
}
]
})
  1. 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.

More Resources

Medusa - Elasticsearch plugin