Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search on multiple Categories
- This topic has 5 replies, 2 voices, and was last updated 8 years, 8 months ago by
Ernest Marcinko.
-
AuthorPosts
-
September 19, 2017 at 10:49 am #14785
EssexPaulo
ParticipantHi 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 8 years, 8 months ago by
EssexPaulo.
September 19, 2017 at 5:24 pm #14795Ernest Marcinko
KeymasterHi 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.
September 19, 2017 at 5:37 pm #14796EssexPaulo
ParticipantHi Ernest,
You’re an absolute star. Really appreciate the help 🙂
Fixed perfectly.
PaulSeptember 19, 2017 at 5:47 pm #14797Ernest Marcinko
KeymasterYou cannot access this content.
September 27, 2017 at 9:56 pm #14915EssexPaulo
ParticipantHello 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,
PaulSeptember 27, 2017 at 10:20 pm #14916Ernest Marcinko
KeymasterHi 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.
-
This topic was modified 8 years, 8 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.