Use Elasticsearch to power your product search
Integration type
Category
Repository
Last published
Downloads in past month
This plugin allows your product search to be powered by Elasticsearch - a powerful Open Source search engine. This is a drop-in replacement for the DefaultSearchPlugin which exposes many powerful configuration options enabling your storefront to support a wide range of use-cases such as indexing of custom properties, fine control over search index configuration, and to leverage advanced Elasticsearch features like spacial search.
Requires Elasticsearch v7.0 - 7.10. Elasticsearch version 7.10.2 will throw error due to incompatibility with elasticsearch-js client. Check here for more info.
npm install @elastic/elasticsearch @vendure/elasticsearch-plugin
Make sure to remove the DefaultSearchPlugin if it is still in the VendureConfig plugins array.
Then add the ElasticsearchPlugin, calling the .init() method with ElasticsearchOptions:
import { ElasticsearchPlugin } from '@vendure/elasticsearch-plugin';
const config: VendureConfig = {
// Add an instance of the plugin to the plugins array
plugins: [
ElasticsearchPlugin.init({
host: 'http://localhost',
port: 9200,
}),
],
};
See the ElasticsearchPlugin docs for complete documentation.