Repository navigation
π Main features
HyvΓ€ themes: strict Content Security Policy compatibility
The Elasticsuite HyvΓ€ compatibility modules now work with a strict Content Security Policy (no unsafe-inline / unsafe-eval script sources, Alpine.js CSP build).
They support both the Hyva/default and Hyva/default-csp themes, with the HyvΓ€ 1.3, 1.4 and 1.5 themes.
Elasticsuite: the hyva-themes/magento2-smile-elasticsuite module (Hyva_SmileElasticsuite), maintained by the Elasticsuite team, now has one release line per HyvΓ€ themes line.
Install the line matching your HyvΓ€ themes:
| HyvΓ€ themes | Hyva_SmileElasticsuite | Installation |
|---|---|---|
| 1.3 | 1.3.x | composer require hyva-themes/magento2-smile-elasticsuite:~1.3.0 |
| 1.4 | 1.4.x | composer require hyva-themes/magento2-smile-elasticsuite:~1.4.0 |
| 1.5.1 and newer | 1.5.x | composer require hyva-themes/magento2-smile-elasticsuite:~1.5.0 |
With the HyvΓ€ 1.5 themes, the 1.4.x and older lines fail on category and search result pages listing a configurable product: use the 1.5.x line.
π Elasticsuite Premium: the HyvΓ€ compatibility module smile/module-elasticsuite-hyva-compatibility (instant search, facet recommender, recommender sliders, A/B campaigns) works with the three lines.
It now requires hyva-themes/magento2-smile-elasticsuite ~1.3.0 || ~1.4.0 || ~1.5.0 and hyva-themes/magento2-theme-module 1.4.1 or newer.
If you override templates of these modules in your theme, please follow their upgrade guides before upgrading:
- Hyva_SmileElasticsuite:
UPGRADE_TO_1.3.md,UPGRADE_TO_1.4.mdandUPGRADE_TO_1.5.md, up to the line matching your HyvΓ€ themes; - π Elasticsuite Premium:
UPGRADE_CSP.md.
π Language support: stemmer override rules from the Admin
Language stemmers sometimes miss the plural form of a word, or give the same stem to quite different words.
Some languages (French, Italian and Swedish) already come with a few rules forcing the stem of such words, for instance jeux => jeu in French, but adding or changing them required a developer and a custom elasticsuite_analysis.xml file.
This release introduces in Elasticsuite Premium the ability to define these stemmer override rules from the Magento Admin: each rule forces a word ("Original term") to be stemmed to a given value ("Stem"), whatever the stemmer (algorithmic or dictionary based) would produce.
When enabled, your rules replace the predefined rules of the store view language, and the "Load default rules" button lets you start from those.
This can be configured at the store view scope in Stores > Configuration > Elasticsuite > Analyzers Settings > Stemmer override rules (a full reindex is required after changing the rules).
Virtual categories: keeping virtual rules small
A virtual category whose rule relies on a top category (as its virtual root, or in a category condition) embeds the queries of all the virtual categories below that top category.
On catalogs relying on virtual categories a bit beyond the reasonable, such queries can grow beyond the search engine max_clause_count (1024) and fail.
Two new settings, in Stores > Configuration > Elasticsuite > Catalog Search > Catalog Rules Configuration, can keep these rules small:
- Boundary categories for virtual rules:
The setting allows to designate a category as a boundary category: when a virtual category uses it as its virtual root or in a category condition, the boundary category is treated as a physical category without any virtual subcategory, that is only its own products and those of its subtree.
The page and the layered navigation of the boundary category itself are unchanged.
For instance, if "Default Category > Products" holds most of the catalog and hundreds of virtual descendants, adding it as a boundary category keeps the queries of the virtual categories relying on it small. - Treat the store root category as a purely physical category in rules (enabled by default): a store root category used in a rule (virtual categories, optimizers, widgets) or in a GraphQL category filter now stands for the products of the store tree, without expanding every virtual category of the store.
Set it to No to restore the legacy behaviour.
Categories relying on each other through their virtual rules (category conditions, virtual roots or virtual subcategories) form cycles: their products may be unexpected, since a category being built is left out of the queries built meanwhile.
A new detector finds these groups of interdependent categories and their shortest cycle (eg. "Women (12) > Women Picks (40) > Summer (75) > Women (12)"), boundary categories and store roots treated as physical categories breaking the cycles going through them.
A category that can't be expanded within a cycle is now treated as a physical category in the rules embedding it, instead of being left out of them and widening their queries.
π In Elasticsuite Premium:
- the Virtual Categories Dashboard
- shows the virtual categories using boundary categories;
- it estimates the number of clauses of each category query, in a new "Number of clauses" column, and warns from the "Virtual Categories Dashboard: clauses count alert threshold" setting (1024 by default, 0 to disable);
- it checks the cycles of virtual categories with its "Check virtual categories cycles" button, and lists the categories involved with the "Part of a cycle" filter of its "Alerts" column; the check is also available from the CLI with
bin/magento elasticsuite:premium:virtual-categories:check-cycles;
- the "Virtual rules maximum build size" setting (1000 by default, 0 for no limit) limits the number of category queries built for a single category: when exceeded, typically because of intricate or cyclic rules, the category returns no products for one hour, an error listing the categories involved is logged, and the dashboard shows "Error" for it and for the categories relying on it.
Virtual categories and optimizers: dependency-aware caching
The queries of the virtual category rules and the optimizer functions are now cached with the categories they depend on:
- they are refreshed as soon as a category they rely on changes, however deep the chain (category conditions, virtual root, virtual subcategories), or when a category is enabled, disabled, deleted or moved (also when applying a Content Staging update on Adobe Commerce);
- queries using the "is discount" condition or a price condition are cached per customer group, only when they need to;
- queries using "created/updated within the last X days" conditions expire at midnight;
- optimizers using the "is discount" condition or a virtual category no longer apply the functions of another customer group, or an outdated virtual category query.
Price conditions (eg. "Price is less than 100") now match the prices of the current customer group, instead of the prices of any customer group (the "NOT LOGGED IN" prices where there is no customer session, eg. admin previews).
It also builds fewer queries: on a test catalog of 400 virtual categories, building them all from an empty cache ran 3564 SQL queries before and 2404 now, with the same results.
These queries are now stored in the Elasticsuite cache type, which must stay enabled (check with bin/magento cache:status). No reindex is needed.
If you customized the cache keys of the virtual category rules (eg. through a patch of Helper\Rule::loadUsingCache()), please review your changes.
π¦ Features
- π [AdvancedAnalysis] Feature #504, allow to configure "stemmer overrides" from the Admin by @vahonc
- π [AdvancedAnalysis] Feature #506, ability to load default rules into the stemmer override rules by @vahonc
- π [CategoryMonitoring] Tell the problems of virtual roots and category references apart by @rbayet
- π [CategoryMonitoring] Show the virtual categories using expansion boundaries by @rbayet
- π [CategoryMonitoring] Check the cycles of virtual categories from the CLI and the dashboard by @rbayet
- π [CategoryMonitoring] Virtual Categories Dashboard: estimated number of clauses by @rbayet
- π [CategoryMonitoring] Limit the number of queries built for a single virtual rules query by @rbayet
- π [Conversational Search] Add custom search container for the agent by @PierreGauthier
- π [Conversational Search] Add LLM provider configuration by @PierreGauthier
- [Core] Allow changing from admin the tokenizer for shingles by @rbayet in #3933
- [Core] Support X-Opaque-Id header to identify problematic requests in server slow log by @rbayet in #3941
- π [HyvaCompatibility] CSP strict compatibility for Hyva last 1.3.x releases by @rbayet
- π [HyvaCompatibility] CSP strict compatibility for Hyva last 1.4.x releases by @rbayet
- π [HyvaCompatibility] CSP strict compatibility for Hyva last 1.5.x releases by @rbayet
- [Indices] Memorize indices grid filters in session by @rbayet in #3932
- π [Mixer] Allow using the mixer with custom attributes by @rbayet
- π [Mixer] Make the number of mixed positions configurable by @rbayet
- π [Mixer] Limit the number of top hits products per mixer field value by @rbayet
- [VirtualCategories] Add virtual rules expansion boundary categories by @rbayet in #3944 and #3949
- [VirtualCategories] Add a detector of the cycles of virtual categories by @rbayet in #3959
β¨ Improvement
- [CatalogRule][VirtualCategories][CatalogOptimizer] Dependency-aware caching of rule queries by @rbayet in #3950
- [VirtualCategories] Treat the store root as a purely physical category in rules by @rbayet in #3947
π» Technical
- π [AdvancedAnalysis] Comment update for the tokenizer for shingles setting by @rbayet
- [CatalogRule] Allow varying every cached rule query on some contexts by @rbayet in #3956
- π [CategoryMonitoring] Count the products of the dashboard categories on demand by @rbayet
- π [CategoryMonitoring] Code quality fix by @rbayet
- [CodeQL] Future-proof a few edge cases in report filtering and campaign tracking by @vahonc in #3969
- [Core] Fixes upcoming PHP 8.6 deprecated usage of 'is_integer' function. by @hostep in #3923
- π [HyvaCompatibility] Upgrade guides from 1.2.x to 1.3.x/1.4.x/1.5.x with CSP by @rbayet
- π [Mixer] Declare the Mixer module in the Monorepo package by @rbayet
- [VirtualCategories] Allow limiting the queries built for a single virtual rules query by @rbayet in #3970 and #3971
- [VirtualCategories] Size the search request of catalog product widgets from their SQL limit (Magento 2.4.9) by @Amadeco in #3946
π Fixes
- π [AB Campaign] Fix #523, guard conversion-rate and significance calculations against zero-session scenarios by @vahonc
- [Catalog] Fixes #3695 Handle attributes saved through the product attribute repository by @Hawksama in #3940 (2.10.x backport in #3942)
- [CatalogRule] Match price conditions against the prices of the current customer group by @rbayet in #3955
- π [CategoryMonitoring] Fix virtual categories dashboard filters by @rbayet
- [Core] Fix #3937, Single term sortable matches boost value not applied correctly, always 0 by @vahonc in #3938
- [Core] Fix typos in significant terms aggregation by @rbayet in #3943
- π [HyvaCompatibility] Use GET for A/B campaign scenarios beacon, like Luma by @rbayet
- π [HyvaCompatibility] Remove the RequireJS-based Google Analytics blocks on HyvΓ€ by @rbayet
- π [Mixer] Fix the mixer field resolution of the categories by @rbayet
- π [Mixer] Clean the mixed products when a virtual rule they depend on changes by @rbayet
- π [Mixer] Fix the mixer field resolution of the category mixer details by @rbayet
- π [Mixer] Fix the mixer field resolution of the products widget by @rbayet
- π [Mixer] Fix the mixing of products having several values by @rbayet
- π [Recommender] Fix error on missing co-occurrence or visitor bucket when the search failed by @rbayet
- π [Recommender] Only use a properly encoded uenc parameter in the add to links of the ajax recommendations by @rbayet
- [Thesaurus] Properly escape and bind the thesaurus grid Terms filter value (3d63f57), thanks to Εukasz Bajsarowicz
- [VirtualCategories] Restrict virtual category subtree url_path lookup to the current store root by @hubertb-hub in #3926
- [VirtualCategories] Fix: Add isActiveFilter to prevent disabled categories from being found by @wahidnory in #3931
- [VirtualCategories] Fixes #3929 replace virtual cat. URL prefix only at the beginning by @rbayet in #3934
- [VirtualCategories] Fixes #3930 replace virtual cat. URL suffix only at the end by @rbayet in #3935
- [VirtualCategories] Treat a category that can't be expanded as physical only instead of leaving it out of rule queries by @rbayet in #3957 and #3958
- [VirtualCategories] Sort the category preview on the positions of the previewed category by @rbayet in #3967
- [VirtualCategories] Fix rule category chooser losing deep selected categories by @rbayet in #3968
New Contributors
- @hubertb-hub made their first contribution in #3926
- @Hawksama made their first contribution in #3940
- @wahidnory made their first contribution in #3931
- @Amadeco made their first contribution in #3946
Full Changelog: 2.12.2.2...2.12.3