Elasticsearch is a powerful search engine that improves product search speed and accuracy in Magento. It replaces the default MySQL search with a scalable, full‑text search solution. On ruachost.com, Elasticsearch is supported for Magento 2.4 and later.

 

Why Use Elasticsearch?

  • Provides fast, relevant search results for customers.

  • Supports advanced features like autocomplete, synonyms, and spell correction.

  • Scales easily for large catalogs with thousands of products.

  • Improves overall site performance compared to MySQL search.

 

Steps to Configure Magento with Elasticsearch

Step 1: Ensure Elasticsearch is Installed

  • On Managed VPS/Dedicated Servers → Ruachost support can install Elasticsearch for you.

  • On Unmanaged VPS → Install manually via SSH:

    Bash
    
    apt-get install elasticsearch
    

    or

    Bash
    
    yum install elasticsearch
    

Step 2: Configure Magento to Use Elasticsearch

  1. Log in to Magento Admin.

  2. Go to Stores → Configuration → Catalog → Catalog Search.

  3. Under Search Engine, select Elasticsearch.

  4. Configure the following settings:

    • Elasticsearch Server Hostname → 127.0.0.1 (or your server’s IP).

    • Elasticsearch Server Port → 9200.

    • Index Prefix → Optional, useful for multiple Magento installations.

    • Enable Elasticsearch HTTP Auth → Yes/No depending on your setup.

    • Elasticsearch Server Timeout → Recommended: 15.

  5. Save configuration.

 

Step 3: Test Elasticsearch Integration

  • Run reindexing via CLI:

    Bash
    
    php bin/magento indexer:reindex
    

     

  • Clear cache:

    Bash
    
    php bin/magento cache:flush
    
  • Test product search in your storefront.

 

Important Notes

  • Elasticsearch is required for Magento 2.4 and newer.

  • Ensure your server meets memory requirements (at least 2GB RAM for Elasticsearch).

  • If using multiple stores, configure separate index prefixes.

  • Always back up your site before making configuration changes.

War diese Antwort hilfreich? 0 Benutzer fanden dies hilfreich (0 Stimmen)

Powered by WHMCompleteSolution