Search on multiple Categories

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Search on multiple Categories

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

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #14785
    EssexPaulo
    EssexPaulo
    Participant

    Hi Ernest,

    Sorry to bother you again, I need help with my search πŸ˜‰

    I am trying to include two category titles in the search. So I have a category called Plumbers and I also have a category called Chelmsford. If I type either ‘Chelmsford’ or ‘Plumbers’ into the search box I get a correct list however if I add them both ‘Chelmsford’ and ‘Plumbers’ to the search I get results from any post which has either category associated with it.

    I tried changing the Logic to ‘AND’ but this seems to stop all results when you add both ‘Chelmsford’ and ‘Plumbers’ to the search.

    I did try using the Index Table Engine but this option doesn’t seem to include Category titles in the search.

    Can you offer any help?

    Thank you,
    Paul

    • This topic was modified 4 years, 9 months ago by EssexPaulo EssexPaulo.
    #14795
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Paul,

    I believe the issue was simply that the index table was probably not recreated when it’s configuration was changed. So I simple clicked the ‘Create new index’ button, and now it looks like it’s working.

    I have also changed the logic to AND, for testing: https://i.imgur.com/lG6ZzMP.png

    Now if I type in for example ‘chelmsford plumber’ I get only matches where both of these keywords are present – likely from their categories.

    Best,
    Ernest Marcinko

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


    #14796
    EssexPaulo
    EssexPaulo
    Participant

    Hi Ernest,

    You’re an absolute star. Really appreciate the help πŸ™‚

    Fixed perfectly.
    Paul

    #14797
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

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


    #14915
    EssexPaulo
    EssexPaulo
    Participant

    Hello again Ernest.

    I have rated your plugin, top marks πŸ™‚

    I am still having issues with this topic. Some of my posts have more than one category, so I have added a settings check box to show which. When I click off one of the categories no posts show. If they are all checked they show.

    So, If I type ‘Plumbers’ and I uncheck the Chelmsford box I end up with one post (which has all categories). So it must be some AND logic but I have changed the logic and still nothing happens πŸ™

    What am I doing wrong?

    Thanks,
    Paul

    #14916
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Paul,

    Okay, so I see most of the posts belong to almost every category there. The way the category filter works by default is that all of the checked categories must match, and any of the unchecked are excluded. In most cases this is an expected behavior, but in your case this is not desired.

    I have changed the terms logic to ‘At least one selected term should match’: https://i.imgur.com/uHz3gjs.png
    That means, that any of the choosen boxes matches, the result is not filtered out. It’s sort of an OR logic.

    I hope this helps.

    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.