Elastic App Search official integration for Magento 2
A first-party Magento integration for building excellent, relevant search experiences with Elastic App Search.
:warning: This is a beta version of the client. View known issues.
Using this client assumes that you have already:
You can install the module in your project by using this composer command from your Magento project root:
composer require elastic/app-search-magento:[email protected]
Once the module is installed, you should clean your cache and update your Magento instance if already installed:
bin/magento cache:clean bin/magento setup:upgrade
To configure your credentials, you will need to collect the following information:
If using a swiftype.com account, you will be able to access this information at https://app.swiftype.com/as/credentials.
Self-managed users should connect to their App Search instance to retrieve their credentials.
You can provide your App Search credentials within Magento Admin by browsing to the Stores > Configuration > General > Elastic App Search section:
The module will create one App Search Engine per store view.
New Engines will use a prefix that can be configured within the client: e.g.
Update this setting (e.g.
my-website-staging) if you plan to use the same account for several environment.
You can update credentials using the Magento CLI:
bin/magento config:set elastic_appsearch/client/api_endpoint "https://host-xxxx.api.swiftype.com" bin/magento config:set elastic_appsearch/client/private_api_key "private-XXXXX" bin/magento config:set elastic_appsearch/client/search_api_key "search-XXXXX"
You can additionally set the Engine prefix:
bin/magento config:set elastic_appsearch/client/engine_prefix "my-website-staging"
Once your credentials are set in Magento, you need to update Magento configuration to use App Search instead of the out of the box MySQL search engine.
Browse to the Stores > Configuration > Catalog > Catalog Search section to do so:
As an alternative, you can use the Magento CLI to change the default search engine:
bin/magento config:set catalog/search/engine "elastic_appsearch"
To finish the install, you need to clean your cache and reindex your content into App Search:
bin/magento cache:clean bin/magento indexer:reindex catalogsearch_fulltext
The module is in its first round of beta. This first round is intended to act as a technical preview, which aims to integrate App Search as a Magento search adapter interface.
There are a few caveats with the current implementation:
The maximum number of fields allowed by App Search (currently 64) does not allow you to index catalogs with too many products attributes (#37)
We will need to rework how product prices are stored into App Search to allow sites with a large number of customer groups to be indexed (#38)
Search relevance is still being tuned.
We ❤️ developers and want everyone to be able to contribute to the module.
We have built a fully dockerized development environment using Magento sample data to help you in testing the module and contributing to the code.
Full documentation to setup your environment is available here.
If something is not working as expected, please open an issue.
Your best bet is to read the documentation.
You can checkout the Elastic community discuss forums.
We welcome contributors to the project. Before you begin, a couple notes...
Thank you to all the contributors!