2.11.3
📦 Features
Edge-ngram analyzer
In this release we introduced the ability to defined edge_ngram
analyzer to particular fields.
This analyzer can be defined per each attribute in Stores > Configuration > Attributes > Storefront properties > Advanced Elasticsuite Configuration and then switching the default analyzer to standard_edge_ngram
.
This will require a full reindex (should be triggered automatically as soon as you save the attribute).
The idea is to be able to generate "ngrams" for this attribute to be able to search on them.
Eg : if an attribute has "Organic Cotton" as a value, the generated ngrams will be "org, orga, organ, organi, organic, cot, cott, cotto, cotton".
Therefore, searching for "org" or "cot" in Front-office will allow the products having the value "Organic cotton" to be shown.
By default, this is only used when executing a fuzzy search, if you want to use this also for exact matching, you can enable the new parameter that is in Elasticsuite > Search Relevance > Exact matching configuration > Use default analyzer in exact matching filter query.
Please keep in mind that this feature is not meant to be enabled on all attributes, and that it's not recommended to enable it on long text fields (description, etc...) because of the noise and the performance issues it can generates with such fields.
Min score
In this release we also introduced the ability to add the support of min_score
. By going into Elasticsuite > Search Relevance > Relevance Configuration > Min score configuration you'll be able to set a minimum score that products must have to be displayed in search result page.
That's useful if you have a very long tail of not-that-much relevant products, because they might appear in first positions when the user is sorting by price or by name in the result page.
Experimental settings for SKU/reference matching
All searchable fields using the reference
analyzer are now copied into a new reference
collector field in the index (this will require a full re-index to take effect).
This can be combined with three new experimental settings (disabled by default) that should help provide, depending on your references structure, better matching and recall of product references.
The new section Elasticsuite > Search Relevance > Spellchecking Configuration > Term Vectors Configuration provides two new settings
- Use all tokens from term vectors, which, when enabled, makes sure that when searching a product reference like 'AN328CZ127' Elasticsuite no longer only search for the homogeneous alphanumeric components 'AN', '328', 'CZ' and '127' but also the whole original string 'AN328CZ127'. This is particularly useful if the actual product reference is for instance 'AN-328-CZ/127': this will allow a fuzzy match with better accuracy ;
- Use reference analyzer in term vectors, which, when enabled, makes sure that the specific way the fields using the
reference
analyzer are indexed is taken into account when Elasticsuite determines if what the user searches exists exactly, almost exactly, or in a fuzzy matching way in the index. Combined with the previous setting, it should blur the lines between searching for 'AN-328-CZ/127' and 'AN328CZ127' for instance, in both case making Elasticsuite perform an exact match query with pretty much the same results set.
The new section Elasticsuite > Search Relevance > Relevance Configuration > Exact Match Configuration provides the new setting
- Use reference analyzer in exact matching filter query, which, when enabled, makes sure that all searchable fields using the
reference
analyzer (and not just thesku
field) are looked into when performing an exact match query. This should solve some strange issues where searching exactly for a product reference stored in a custom fielditem_number
ormanufacturer_part_number
leads to 0 results.
Additionally any change to the relevance settings that should not require a full reindex to take effect (this includes the three settings above) is now immediately taken into account by Elasticsuite pre-analysis mechanism, helping you finetune the search engine faster (we still recommend to do that on a staging environment, of course 😉).
What's Changed
- Fix #2965, default value for the property 'display_pattern' of EAV attributes by @vahonc in #2970
- Fix is spellchecked graphql by @romainruaud in #2981
- Fixes #2987 Check if category is virtual when evaluating useVirtualCa… by @rbayet in #2988
- Feature #2917, add min_score support for matching documents by @vahonc in #2986
- Inject all fields with their default analyzer in fuzzy queries. by @romainruaud in #2991
- [Spellcheck] Experimental settings for better sku/reference token ext… by @rbayet in #2992
- Fix #2978, update db_schema.xml by @vahonc in #2993
- Target non-default analyzer fields in exact search. by @romainruaud in #2995
- Adding min_score i18n by @romainruaud in #2996
- [Spellchecker] Cleaning spelling type cache when relevance config is … by @rbayet in #2997
Full Changelog: 2.11.2...2.11.3