Filtering Issue with Child Terms and ‘OR’ Setting
- pridigitalParticipant1 year, 5 months ago #37370
Hello,
I’ve encountered a problem while filtering child terms with the current setting activated:
“When several items of the facet are selected, use ‘OR’. Default is ‘AND’.”If I choose the “parent term,” I expect to see all the records. However, when selecting a child term, I want it to display only the records associated with that child, disregarding any records linked to the parent.
This approach seems more logical than the current behavior, where both parent and child records are combined.
Nevertheless, the selection of any children terms from multiple parents should function as an ‘OR’.
Thank you for your prompt assistance.
- This topic was modified 1 year, 5 months ago by pridigital.
wpsolrKeymaster1 year, 5 months ago #37373I moved this topic in the “New features requests” forum, for the “do not show children items when parent item is selected”.
The “OR” between category items already works, despite the message sayong the contrary in the facet settings screen.
For instance, several categories selected on our Elasticsearch demo with a “OR”.
pridigitalParticipant1 year, 5 months ago #37490Can you please share a screenshot of how the facets are configured in the example you shared? Thanks
pridigitalParticipant1 year, 5 months ago #37497It’s quite strange. I’ve applied the settings you provided to my website, and they function correctly in the demo. However, I’m encountering a problem where, upon selecting the “Men’s Hat” filter, it displays items marked as both “Men’s Clothing” and “Clothing” instead of narrowing down the results. Just wanted to mention that I’m using Opensolr and select2js, although I’m not sure if that’s relevant. Any ideas?
- This reply was modified 1 year, 5 months ago by pridigital.
pridigitalParticipant1 year, 3 months ago #38523Please visit the demo link you provided. Once there select the “Men’s Hat” and the “Men’s Shoes” filters. Both filters show products from the “Men’s Clothing” term, right?
Visit the same link in another tab but this time select only the “Men’s Clothing” term. In the demo the products don’t seem to be connected directly to the “Men’s Clothing” term. Therefore you see a message that says “No products were found matching your selection.”, right?
Our current issue arises from our products being associated with both “Men’s Clothing” and either “Men’s Hat” or “Men’s Shoes.” This causes an error when employing the OR filter logic. When all three terms are chosen simultaneously (parent + child 1 + child 2), the results are the same as selecting only two terms (parent + child x).
We believe a more logical solution would involve disregarding the parent term when selecting child terms. Does this clarification make sense?
- This reply was modified 1 year, 3 months ago by pridigital.
pridigitalParticipant1 year, 2 months ago #39339Would you mind changing the “layout settings” for the facet from “checkbox” to “select2.js” and check if you experience the same behavior? Because I’m still having this issue on my site and that seems to be the only difference.
pridigitalParticipant1 year, 2 months ago #39340Also, are you adding the single products to the “Men’s Hats” term only or to “Clothing”, “Men’s Clothing” and “Men’s Hats” terms?
pridigitalParticipant1 year, 1 month ago #40261Do you plan to make this work with select2.js as well?
You must be logged in to reply to this topic.