Adobe Commerce only. Learn more.

Install Live Search

Live Search is a set of standalone meta packages that replaces standard Magento Open Source and Adobe Commerce search capabilities. This topic provides instructions to do the following:

Package Description
module-live-search Allows merchants to configure their search settings for faceting, synonyms, query rules, etc., and provides access to a read-only GraphQL playground to test queries from the Adobe Commerce Admin.
module-live-search-adapter Routes search requests from the storefront to the Live Search service and renders the results in the storefront.
- Category browse - Routes requests from the storefront top navigation to the search service.
- Global search - Routes requests from the quick search box in the upper-right of the storefront to the Live Search service.
module-live-search-storefront-popover A “search as you type” popover replaces the standard quick search and returns dynamic product suggestions and thumbnails of top search results.

Requirements

Supported Platforms

  • Adobe Commerce on prem (EE) : 2.4.x
  • Adobe Commerce on Cloud (ECE) : 2.4.x

At this time, Adobe Commerce for B2B is not supported.

Before you begin

Do the following:

  1. Confirm that cron jobs and indexers are running.

  2. Choose the onboarding method that meets your requirements, and follow the instructions.

    • Method 1: Install without Elasticsearch
    • Method 2: Install with Elasticsearch (No downtime)

Method 1: Install without Elasticsearch

This onboarding method is recommended when installing Live Search to a:

  • New Commerce installation
  • Staging environment

In this scenario, storefront operations are interrupted while the Live Search service indexes all products in the catalog. During the installation, Live Search modules are enabled and Elasticsearch modules are disabled.

  1. Install Adobe Commerce 2.4.x without Live Search.

  2. To download the live-search package, run the following from the command line:

    1
    
    composer require magento/live-search
    

    For more information, see the list of Live Search dependencies that are captured by Composer.

  3. Run the following commands to disable Elasticsearch and related modules and install Live Search:

    1
    
    bin/magento module:disable Magento_Elasticsearch Magento_Elasticsearch6 Magento_Elasticsearch7 Magento_ElasticsearchCatalogPermissions Magento_AdvancedSearch  Magento_InventoryElasticsearch
    
    1
    
    bin/magento setup:upgrade
    

    While the data is indexed and synchronized, the search and category browse operations are not available in the storefront. Depending on the size of your catalog, the process can take at least an hour from the time cron runs to synchronize your data to Live Search services.

  4. Verify that the following indexers are set to Update by Schedule:

    • Product Feed
    • Product Variant Feed
    • Catalog Attributes Feed
  5. Configure your API keys to synchronize your catalog data to Live Search services.

  6. To make facets available as filters in the storefront, add the facets you need, according to the requirements.

    You should be able to add facets after cron runs the attribute feeds and exports attribute metadata.

  7. Wait at least an hour after cron runs to synchronize data. Then, verify that the data was exported.

  8. Test the connection from the storefront.

Method 2: Install with Elasticsearch

This onboarding method is recommended when installing Live Search to:

  • An existing production Commerce installation

In this scenario, Elasticsearch temporarily manages search requests from the storefront while the Live Search service indexes all products in the background, without any interruption to normal storefront operations. Elasticsearch is disabled and Live Search enabled after all catalog data is indexed and synchronized.

  1. To download the live-search package, run the following from the command line:

    1
    
    composer require magento/live-search
    

    For more information, see the list of Live Search dependencies that are captured by Composer.

  2. Run the following command to temporarily disable the Live Search modules that serve storefront search results.

    1
    
    bin/magento module:disable Magento_LiveSearchAdapter Magento_LiveSearchStorefrontPopover
    
    1
    
    bin/magento setup:upgrade
    

    Elasticsearch continues to manage search requests from the storefront while the Live Search service synchronizes the catalog data and indexes products in the background.

  3. Verify that the following indexers are set to Update by Schedule:

    • Product Feed
    • Product Variant Feed
    • Catalog Attributes Feed
  4. Configure your API keys to synchronize your catalog data to Live Search services.

  5. To make facets available as filters in the storefront, add the facets you need, according to the requirements.

    You should be able to add facets after cron runs the product and attribute feeds and exports attribute metadata to Live Search services.

  6. Wait at least an hour for the data to be indexed and synchronized. Then, use the GraphQL playground with the default query to verify the following:

    • The product count returned is close to what you expect for the store view
    • Facet(s) are returned
  7. Run the following commands to disable Elasticsearch modules, enable Live Search modules, and run setup.

    1
    
    bin/magento module:enable Magento_LiveSearchAdapter Magento_LiveSearchStorefrontPopover
    
    1
    
    bin/magento module:disable Magento_Elasticsearch Magento_Elasticsearch6 Magento_Elasticsearch7 Magento_ElasticsearchCatalogPermissions Magento_AdvancedSearch Magento_InventoryElasticsearch
    
    1
    
    bin/magento setup:upgrade
    
  8. Test the connection from the storefront.

Configure API keys

The Adobe Commerce API key and its associated private key are required to connect Live Search to an installation of Adobe Commerce. The API key is generated and maintained in the account of the Adobe Commerce license holder, who can share it with the developer or SI. The developer can then create and manage the SaaS Data Spaces on behalf of the license-holder. For detailed instructions, see Commerce Services in the User Guide and Configuration Reference.

Adobe Commerce license holder

To generate an API key and private key, see Commerce Services in the Adobe Commerce User Guide.

Adobe Commerce developer or SI

The developer or SI configures the SaaS Data Space as described in the Commerce Services section of the configuration. Commerce Services becomes available in the Admin Configuration sidebar when a SaaS module is installed.

Synchronize catalog data

Live Search requires synchronized product data for search operations, and synchronized attribute data to configure facets. The initial synchronization between the product catalog and the catalog service begins when Live Search is first connected. Depending on the installation method and size of the catalog, it can take up to eight hours for the data to be exported and indexed by Live Search. The list of data that is synchronized and shared with the catalog service can be found in the schema, which is defined in:

vendor/magento/module-catalog-data-exporter/etc/et_schema.xml

Verify export

To verify that the catalog data has been exported from your Adobe Commerce instance and is synchronized for Live Search, look for entries in the following tables:

  • catalog_data_exporter_products
  • catalog_data_exporter_product_attributes

For additional help, refer to Live search catalog not synchronized in the Support Knowledge Base.

Future product updates

After the initial synchronization, it can take up to fifteen minutes for incremental product updates to become available to storefront search. To learn more, go to Streaming Product Updates.

Test the connection

In the storefront, verify the following:

  • The Search box returns results correctly
  • Category browse returns results correctly
  • Facet(s) are available as filters on search results pages

If everything works correctly, congratulations! Live Search is installed, connected, and ready to use.

If you encounter problems in the storefront, check the var/log/system.log file for API communication failures or errors on the services side.

To update Live Search, run the following from the command line:

1
composer update magento/live-search --with-dependencies

To update to a major version such as from 1.0 to 2.0, edit the project’s root Composer .json file as follows:

  1. Open the root composer.json file and search for magento/live-search.

  2. In the require section, update the version number as follows:

    1
    2
    3
    4
    5
    
    "require": {
       ...
       "magento/live-search": "^2.0",
       ...
     }
    
  3. Save composer.json. Then, run the following from the command line:

    1
    
    composer update magento/live-search –-with-dependencies
    

To uninstall Live Search, go to Uninstall modules.

Live Search dependencies

The following Live Search dependencies are captured by Composer:

Dependency Description
Export modules The following modules collect and sync catalog data:
saas-export
module-bundle-product-exporter
module-catalog-data-exporter
module-catalog-inventory-data-exporter
module-catalog-url-rewrite-data-exporter
module-configurable-product-data-exporter
module-data-exporter
module-parent-product-data-exporter
services-connector Required to configure your connection to Commerce Services.
module-services-id Required to configure your connection to Commerce Services.