error in category search results

Home Forums Product Support Forums Ajax Search Pro for WordPress Support error in category search results

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 4 years ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #26689
    nelsong41
    nelsong41
    Participant

    Hello,

    Thank you for this useful plugin. I am having problems with the search results given when using the front-end search. I have a search called “recipe category search,” which I used to create a page with a search sidebar on the left and the results on the right in a posts widget. The search is on this page: https://cookloveheal.com/recipes . I created a front-end search with a list of post categories, which you can see.

    The problem is that if you select more than one category, it gives “OR” results instead of an “AND” results. Try selecting “gluten free” under Dietary, and “desserts” under Courses. You can see that the first post is a soups post which I have confirmed has no “dessert” category or tag anywhere in it.

    I tried the other two logic options, but they return even worse results, that contain posts with neither of those categories.

    Disabling other plugins does not change anything, and I don’t see any error messages. Can you tell me what is wrong?

    The admin login url is: https://cookloveheal.com/ngrzir

    Thank you,
    Nelson

    #26717
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Nelson,

    Thank you for the details, it helps a lot.

    Since all the items are from the same exact taxonomy, changing the taxonomy logic won’t do anything here. You are looking for the checkbox logic and the empty taxonomy terms options.
    In your case, I would suggest experimenting with those. The third option might be the best fit for you.
    You probably won’t get exactly the way you want it to, because for that “dietary” and “courses” should be separate taxonomies, as all food belong to at least into one of them.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #26721
    nelsong41
    nelsong41
    Participant

    Yes, I tried that option and the results don’t make sense at all. Did you try it when you logged in?

    #26734
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Yes, I did log-in just now. As I suggested earlier, the best option in your case is this. With this, you will strictly get the results only matching the checklist.

    I understand what you need, but for that, the “Dietary” and “Courses” should be separate taxonomies – but they are not, so it is not going to work that way.
    For example, I check “Gluten Free” + “Dessert” + “Salad” – you expect to see Gluten Free desserts and gluten free salads, that is a valid expectation. However because these are in the same taxonomy (group), there is no way to separate the “Dietary” and the “Courses” categories, to compare the child terms logic individually. The selections are treated as selections from a single group – so the logic applies to them as a whole.
    Because of this, there is no way to tell that “Gluten Free” is a must + either “Dessert” or “Salad”, becuse these are a single group.
    For this to work that way, the Dietary and the Courses need to be separate taxonomies.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


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

You must be logged in to reply to this topic.