-
Notifications
You must be signed in to change notification settings - Fork 340
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
"is_used_for_promo_rules" is not handled in getFieldAnalyzers #3171
Comments
Hi @mvenghaus Maybe changing this line would be better, no ?
I'd prefer to add the untouched when needed, rather than "removing the keyword so that the untouched will be added after". It seems more understandable for me. Your thoughts ? |
Hey @romainruaud , in my understanding the first analyzer is used as the default analyzer. Would the expected analyzer check fail because the untouched is the second one? |
The default analyzer is the one returned by Did you give a try to my proposal ? It should work the same way as yours, except that the field would still have the keyword as default, and another untouched analyzer being added. Regards |
This issue was waiting update from the author for too long. Without any update, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away! Thanks for your contribution. |
Hey @romainruaud, adding an addtional untouched analyzer works. I've created a pull request where this is handled. Regards |
If you want to use a text attribute only in promo rules, not searchable, not filterable, you get the wrong default search analyzer.
https://github.com/Smile-SA/elasticsuite/blob/2.11.x/src/module-elasticsuite-core/Index/Mapping/Field.php#L377
Here every text attribute gets the keyword analyzer by default. To filter in promos it should get the untouched analyzer to work like it should. The "is_used_for_promo_rules" is not handled there. If you try to use it without, the checkAnalyzer fails and you get an empty propertyName.
I think s.th. like this could solve this
Then you get the same analyzer like a filterable field.
Preconditions
Magento Version : 2.4.6
ElasticSuite Version : 2.11.5.1
Environment : Developer
Third party modules : -
Steps to reproduce
Create a text attribute with only "is_used_for_promo_rules" enabled.
The text was updated successfully, but these errors were encountered: