Filtering Issue with Child Terms and ‘OR’ Setting

  • pridigital
    Participant
    5 months, 2 weeks 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 5 months, 2 weeks ago by pridigital.
    wpsolr
    Keymaster
    5 months, 2 weeks ago #37373

    I 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”.

    pridigital
    Participant
    5 months, 1 week ago #37490

    Can you please share a screenshot of how the facets are configured in the example you shared? Thanks

    wpsolr
    Keymaster
    5 months, 1 week ago #37492

    Here it is:

    Image wpsolr-facet-hierarchy-or.png of

    pridigital
    Participant
    5 months, 1 week ago #37497

    It’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?

    Demo site works!

    • This reply was modified 5 months, 1 week ago by pridigital.
    wpsolr
    Keymaster
    5 months, 1 week ago #37504

    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

    I’m not sure I understand.

    pridigital
    Participant
    3 months, 1 week ago #38523

    Please 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 3 months, 1 week ago by pridigital.
    wpsolr
    Keymaster
    3 months, 1 week ago #38525

    The Elasticsearch index demo was corrupted. I created a new one, and all looks good now.

    Image wpsolr-demo-men-clothing.png of Image wpsolr-demo-men-hats-or-shoes.png of

    pridigital
    Participant
    2 months, 1 week ago #39339

    Would 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.

    pridigital
    Participant
    2 months, 1 week ago #39340

    Also, are you adding the single products to the “Men’s Hats” term only or to “Clothing”, “Men’s Clothing” and “Men’s Hats” terms?

    wpsolr
    Keymaster
    2 months ago #39771

    I confirm that “Or” with hierarchies work for the checkbox UI only.

    pridigital
    Participant
    1 month, 2 weeks ago #40261

    Do you plan to make this work with select2.js as well?

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.