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 6 years, 11 months ago.
- AuthorPosts
- September 19, 2017 at 10:49 am #14785
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 6 years, 12 months ago by EssexPaulo.
September 19, 2017 at 5:24 pm #14795Hi 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 :)
September 19, 2017 at 5:37 pm #14796Hi Ernest,
You’re an absolute star. Really appreciate the help 🙂
Fixed perfectly.
PaulSeptember 19, 2017 at 5:47 pm #14797You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
September 27, 2017 at 9:56 pm #14915Hello 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 #14916Hi 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 :)
- AuthorPosts
You must be logged in to reply to this topic.