Frequently Asked Questions
In this article, we will look through the Elasticsearch configurations in Magento 2. But before we start, make sure you have installed the Elasticsearch engine to your server. For this, check the official installation guide or ask our specialists about the installation service.
→ Extend search possibilities with our Elastic Search plugin. It includes autocomplete suggestions, spell correction, long-tail search, fallback search, and other features to make the on-store search even faster.
Step 1. Log in to your admin panel and navigate to Stores > Settings > Configuration.
Step 2. Then, in the Catalog tab, click Catalog and open the Catalog Search section.
Step 3. In the Search Engine field, choose the version of Elasticsearch that is installed on your server. Magento recommends using versions 5.x and higher.
Step 4. If needed, you can Enable EAV Indexer to improve the indexation speed of your Magento 2.
Step 5. Next, specify the Minimal and Maximum Query Length. Note that these numbers should be the same as in search engine configurations.
Step 6. Define the Number of top search results to cache and Autocomplete Limit. These settings can affect search performance.
Step 7. After this, you need to set up the connection.
For this, enter Elasticsearch Server Hostname, Port, and Index Prefix.
Step 8. If needed, enable Elasticsearch HTTP authentication.
Step 9. In the Elasticsearch Server Timeout field, enter the number in seconds. Then, click Test Connection. If you get the error and test failed, check the official documentation to solve this problem.
Step 10. Finally, configure the search suggestions.
In the Search Suggestions Count, specify how many search suggestions you want to display.
Step 11. In the Show Results for Each Suggestion field, you can set up if you want to display the total number of search results.
Step 12. Enable Search Recommendations, then enter the Search Recommendation Count, and set if you want to Show Results Count for Each Recommendation.
Step 13. Save the changes.
After this, you can configure Elasticsearch search terms for your Magento store, for example, misspelled words and synonyms. To learn how to do this, check out the official guide.