-
Notifications
You must be signed in to change notification settings - Fork 342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filtering product collection by exact SKU returns wrong results when SKU contains special characters #1381
Comments
Yes it's actually due to the fact that using Please pay attention to the "Why doesn’t the term query match my document?" part especially. Since the From what I can see, there is an easy workaround : just set the <indices xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Smile_ElasticsuiteCore:etc/elasticsuite_indices.xsd">
<index identifier="catalog_product" defaultSearchType="product">
<type name="product" idFieldName="entity_id">
<mapping>
<field name="sku" type="text">
<isFilterable>1</isFilterable>
</field>
... This will allow you to match with the Actually I'm not sure if we should add this behavior to the Core of ElasticSuite or if it's up to people to decide if they want to use this. @rbayet any opinion ? I do not fully measure if indexing the untouched version of SKU would collisionate with your recent work on SKU search. Regards |
Hi @romainruaud, No basically, for correct exact value filtering, the sku should indeed be declared as filterable so its mapping inherits the It will not affect what I described in https://github.com/Smile-SA/elasticsuite/wiki/SearchingBySkuBasics and https://github.com/Smile-SA/elasticsuite/wiki/SearchingBySkuDetailled, the Regards, |
Sounds good to me, so PR #1396 will fix this issue. Regards |
\Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection is not filtering collection properly when SKU condition is used and passed SKUs contain special characters
This might be related to changes done in SKU searching described in wiki:
https://github.com/Smile-SA/elasticsuite/wiki/SearchingBySkuBasics
https://github.com/Smile-SA/elasticsuite/wiki/SearchingBySkuDetailled
Nevertheless filtering itself should not be affected and should return correct results when exact SKUs are provided.
Preconditions
Magento Version : 2.3.1
ElasticSuite Version : 2.7.6
Environment : Developer
Steps to reproduce
ObjectManager is used directly only to simplify reproduction.
Expected result
Actual result
The text was updated successfully, but these errors were encountered: