You are currently looking at the article on an older version of the extension!
The Advanced Search is available to you as an extension of the Shopware Evolve plan.
The Enterprise Search gives you easy configuration options and high performance due to the Elasticsearch foundation.
Since Enterprise Search is based on Elasticsearch, an Elasticsearch instance is a basic requirement for operation. How to integrate Elasticsearch into Shopware 6 is explained here.
As part of the Enterprise Edition, Enterprise Search is available to you as an extension.
You can download and install the extension under Extension > My Extensions.
If you have logged in to the Shopware Account tab, the extension will be listed in the General tab and can be installed via the "..." button.
After the extension is installed, you can activate it using the button to the left of the extension.
You can find more information about extension management here.
Could not install plugin
Should you receive the following message during the installation of the extension
"Could not install plugin, got 1 failure(s). Required plugin/package "shopware/platform >=v6.0
it is necessary to adjust the composer.json of the extension.
You can find the extension in the Shopware directory under /custom/plugins/SwagEnterpriseSearchPlatform.
In the composer.json you have to adjust the following code
"require": {
"shopware/platform": ">=6.1.0 < 6.3.0"
},
Replace the entry
"shopware/platform": ">=6.1.0 < 6.3.0"
with
"shopware/core": ">=6.1.0 < 6.3.0",
"shopware/storefront": ">=6.1.0 < 6.3.0",
"shopware/administration": ">=6.1.0 < 6.3.0",
"shopware/elasticsearch": ">=6.1.0 < 6.3.0"
After you have saved the changes, you can install the extension in the admin under Extensions > My Extensions.
You can find the configuration of the Enterprise Search under Settings > Extensions > Shopware Enterprise Search.
In the tab overview you can configure the basic configuration of the search.
In the General Settings section, Which information is indexed or even boosted (2) calls up a modal in which you specify the records to be considered for the search.
In the hit count section you define the number of elements displayed in the search preview (3) and on the search results page (4).
Searchable information
To specify the data to be searched, first select the entity (1) for which you want to make the setting. In the Enterprise Search, products, categories and manufacturers can be searched.
Afterwards a list with all available records for the selected entity will be displayed below. There you can determine whether each record should not be searched (2), searched (3) or prioritized (4).
Prioritized means that hits are given twice the weighting for the content of this record.
For records that are defined as text (e.g. varchar) at database level, you can also specify whether partial hits (5) should also be included and whether compound words (6) should also be included.
Partial hits are smaller word parts of a longer term (e.g. keyboard)
For compound words, several words are combined even without entering a space (key board also finds keyboard)
After you have initially configured the indexing settings, it is necessary to perform indexing from the server console. For information on how to perform indexing, see the section Indexing.
Please note that the configuration of the indexed data is currently not possible for specific sales channels.
The preview allows you to test the search settings directly in Admin.
To use the preview, first select the sales channel (1) for which you want to test the search.
With the selection (2) next to the search field (3) you can determine whether you want to test the search for products, categories or manufacturers.
In this list you a ranking for the search results will also be shown, so that you can see the relevance of the search term. This ranking is calculated by means of the Elasticsearch search algorithms. You can get some more information about the ranking of a search result by hovering the mouse over the ranking of the search result..
In addition to the prioritization of individual records to be searched, it is possible to create additional boosts. A boosting offers you specific configuration options, e.g. to display certain products further up in the search results.
Product boosting
Existing dynamic product groups are used for the boosting of products. The products that are available in the product group and to which the search query generally applies are given a higher rating.
If you have not yet created a corresponding dynamic product group, we recommend that you do so as a first step.
To configure a product boost, first enter a Name (1) and the desired boosting relevance in the field Boost (2). This boosting relevance is added to the products' already received relevance. To activate the boosting, click on the Active button (3).
Optionally it is possible to use the boosting only in a certain period of time. To do this, set the period in the fields Active from (4) and Active to (5).
As stream type (5) select Product Stream, this will display the field TypeId (7). In the TypeId selection field you can then choose from the existing dynamic product groups..
Category and manufacturer boosting
You can define your own rules for the boosting of categories and manufacturers directly in the boosting modal.
When configuring a category or manufacturer boost, first assign a name (1) and the desired boosting relevance in the field Boost (2). To activate this boosting, click on the Active button (3).
With the fields Active from (4) and Active to (5) you can limit the boosting in time without having to switch it on or off manually at a certain time.
As stream type (6) select Entity Stream, in the field Type (7) category or manufacturer.
Afterwards the possibility to create rules (8) is shown. This rule configuration is based on the Rule Builder. With this you can create individual conditions on the basis of which the boosting is to be applied.
After you have configured the Enterprise search for the first time, it is necessary to build the index. This is done in 3 steps in the server console..
First the indices are created or updated
php bin/console dal:refresh:index
After this step has run through completely, the second step is processing
php bin/console messenger:consume
Finally, the aliases for the indexes can be created
php bin/console es:create:alias
The indexing works exactly the same way as with the technically underlying Elasticsearch integration.
Therefore you can find more information in the documentation of Elasticsearch.
After the initial indexing is done, further changes and new products are automatically applied.