Skip to content
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

Virtual Category Rules - Cannot filter on text attribute that is not searchable #3276

Open
Nuranto opened this issue May 13, 2024 · 1 comment
Assignees

Comments

@Nuranto
Copy link
Contributor

Nuranto commented May 13, 2024

Preconditions

Magento Version : 2.4.7

ElasticSuite Version : 2.11.6

Steps to reproduce

  1. Create/Edit a product that have tata toto tutu string in its description
  2. Edit description attribute, set "Use in search" to "No"
  3. Create/Edit a virtual category with rule : "Description contains 'toto'"

Expected result

  1. Product containing toto is found

Actual result

  1. No product is found. => We can't create a virtual rule which contains a text attribute that we don't want to use for frontend search.
@Nuranto Nuranto changed the title Virtual Category Rules Virtual Category Rules - Cannot filter on text attribute that is not searchable May 13, 2024
@rbayet
Copy link
Collaborator

rbayet commented May 14, 2024

Hello @Nuranto,

Yes, contrary to what happens for numerical and select/multiselect attributes where you can have an attribute not showing in layered navigation but available in the rules through "use for promo rules = yes", this is not totally possible for non-searchable text attributes with "use for promo rules = yes".

I'll have to look at it but worst case scenario the condition is ignored or best case scenario the "contains" becomes a strict "text is equal to".
For it to work, we would have to a finer grain on the application of "searchability" when generating the mapping for a text attribute :

  • if the (text) attribute is EITHER use for promo rules = yes OR searchable = YES, then add the correct field structure in the index to allow fulltext search
  • ONLY if the (text) attribute has searchable = YES then add the "copy_to" instructions to copy the data to the collector fields (search, spelling, reference, etc...)

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants