Install Live Search
Live Search is installed as an extension from Adobe Marketplace. After the Live Search module (with catalog modules as dependencies) is installed and configured, Commerce begins sharing search and catalog data with SaaS services. At this point, Admin users can set up, customize, and manage search facets, synonyms, and merchandising rules.
This topic provides instructions to do the following:
- Install Live Search (Methods 1 and 2)
- Update Live Search
- Uninstall Live Search
Before you begin before-you-begin
Do the following:
Method 1: Install without OpenSearch method-1
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 OpenSearch modules are disabled.
-
Install Adobe Commerce 2.4.4+ without Live Search.
-
To download the
live-search
package, run the following from the command line:code language-bash composer require magento/live-search
-
Run the following commands to disable OpenSearch and related modules, and install Live Search:
code language-bash bin/magento module:disable Magento_Elasticsearch Magento_Elasticsearch7 Magento_OpenSearch Magento_ElasticsearchCatalogPermissions Magento_InventoryElasticsearch Magento_ElasticsearchCatalogPermissionsGraphQl
code language-bash bin/magento setup:upgrade
note warning WARNING 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. -
Verify that the following indexers are set to “Update by Schedule”:
- Product Feed
- Product Variant Feed
- Catalog Attributes Feed
- Product Prices Feed
- Scopes Website Data feed
- Scopes Customer Groups Data feed
- Categories Feed
- Category Permissions Feed
-
Configure your API keys and verify that your catalog data is synchronized with Live Search services.
-
To make facets available as filters in the storefront, add the facets you need, according to the faceting requirements.
You should be able to add facets after
cron
runs the attribute feeds and exports attribute metadata. -
Run the following command in this order:
code language-bash bin/magento saas:resync --feed productattributes bin/magento saas:resync --feed products bin/magento saas:resync --feed scopesCustomerGroup bin/magento saas:resync --feed scopesWebsite bin/magento saas:resync --feed prices bin/magento saas:resync --feed productoverrides bin/magento saas:resync --feed variants bin/magento saas:resync --feed categories bin/magento saas:resync --feed categoryPermissions
-
Verify that the data was exported.
-
Test the connection from the storefront.
Method 2: Install with OpenSearch method-2
This onboarding method is recommended when installing Live Search to:
- An existing production Commerce installation
In this scenario, OpenSearch 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. OpenSearch is disabled and Live Search enabled after all catalog data is indexed and synchronized.
-
To download the
live-search
package, run the following from the command line:code language-bash composer require magento/live-search
-
Run the following command to temporarily disable the Live Search modules that serve storefront search results.
code language-bash bin/magento module:disable Magento_LiveSearchAdapter Magento_LiveSearchStorefrontPopover Magento_LiveSearchProductListing
code language-bash bin/magento setup:upgrade
Elasticsearch continues to manage search requests from the storefront while the Live Search service synchronizes catalog data and indexes products in the background.
-
Verify that the following indexers are set to “Update by Schedule”:
- Product Feed
- Product Variant Feed
- Catalog Attributes Feed
- Product Prices Feed
- Scopes website data feed
- Scopes customer groups data feed
-
Configure your API keys and verify that your catalog data is synchronized with Live Search services.
-
To make facets available as filters in the storefront, add the facets you need, according to the faceting requirements.
You should be able to add facets after
cron
runs the product and attribute feeds and exports attribute metadata to Live Search services. -
Run the following command in this order:
code language-bash bin/magento saas:resync --feed productattributes bin/magento saas:resync --feed products bin/magento saas:resync --feed scopesCustomerGroup bin/magento saas:resync --feed scopesWebsite bin/magento saas:resync --feed prices bin/magento saas:resync --feed productoverrides bin/magento saas:resync --feed variants bin/magento saas:resync --feed categories bin/magento saas:resync --feed categoryPermissions
-
After the sync is complete, use the GraphQL playground with the default query to verify the following:
- The returned product count is close to what you expect for the store view.
- Facet(s) are returned.
-
Run the following commands to enable Live Search modules, disable OpenSearch, and run
setup
.code language-bash bin/magento module:enable Magento_LiveSearchAdapter Magento_LiveSearchStorefrontPopover Magento_LiveSearchProductListing
code language-bash bin/magento module:disable Magento_Elasticsearch Magento_Elasticsearch6 Magento_Elasticsearch7 Magento_ElasticsearchCatalogPermissions Magento_InventoryElasticsearch Magento_ElasticsearchCatalogPermissionsGraphQl
code language-bash bin/magento setup:upgrade
-
Test the connection from the storefront.
Configure API keys 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 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. If you already have a set of API keys, you do not need to regenerate them.
Adobe Commerce license holder
To generate an API key and private key, refer to Commerce Services Connector.
Adobe Commerce developer or SI
The developer or SI configures the SaaS data space as described in the Commerce Services section of the configuration. In the Admin, Commerce Services becomes available in the Configuration sidebar when a SaaS module is installed.
Synchronize catalog data 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 30 minutes 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 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 15 minutes for incremental product updates to become available to storefront search. To learn more, go to Indexing - Streaming Product Updates.
Test the connection test-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 allow Live Search through a firewall, add commerce.adobe.io
to the allow list.
Checking the installed version
Before updating Live Search, run the following from the command line to check the version of Live Search that is installed:
composer show magento/module-live-search | grep version
Updating Live Search update
To update Live Search, run the following from the command line:
composer update magento/live-search --with-dependencies
To update to a major version such as from 3.1.1 to 4.0.0, edit the project’s root Composer .json
file as follows:
-
If your currently installed
magento/live-search
version is3.1.1
or below, and you are upgrading to version4.0.0
or higher, run the following command before the upgrade:code language-bash bin/magento module:enable Magento_AdvancedSearch
For information about the currently installed
magento/live-search
version, run the following command:code language-bash composer show magento/live-search
-
Open the root
composer.json
file and search formagento/live-search
. -
In the
require
section, update the version number as follows:code language-json "require": { ... "magento/live-search": "^4.0", ... }
-
Save
composer.json
. Then, run the following from the command line:code language-bash composer update magento/live-search --with-dependencies
Uninstalling Live Search uninstall
To uninstall Live Search, refer to Uninstall modules.
Live Search packages packages
module-live-search
module-live-search-adapter
- 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
Live Search dependencies dependencies
The following Live Search dependencies are captured by Composer.
magento/module-saas-catalog
magento/module-saas-category
magento/module-saas-category-permissions
magento/module-saas-product-override
magento/module-saas-product-variant
magento/module-saas-price
magento/module-saas-scopes
magento/module-bundle-product-data-exporter
magento/module-catalog-inventory-data-exporter
magento/module-catalog-url-rewrite-data-exporter
magento/module-configurable-product-data-exporter
magento/module-parent-product-data-exporter
magento/module-gift-card-product-data-exporter
magento/module-bundle-product-override-data-exporter
data-services
services-id