Hi!
The reason of this behavior is that the plugin connects the keywords with an “OR” logic, which means wider set of results if more keywords are entered. It’s basically somethings matching keyword1 or somethings matching keyword2 etc..
Currently only the pro version offers a feature to choose a different logic, but I’m planning to release an update to this one as well, which will contain a new option to change the keyword logic to an “AND” – to get more relevant results containing both keywords.
In the meantime the only option is to change that directly in the code.
If you want, you can do that by opening the wp-content\plugins\ajax-search-lite\includes\classes\search\search_content.class.php file and replacing lines 101, 127, 151, 175 and 194, which should be:
$op = 'OR';
with
$op = 'AND';
That will change the logic to match both keywords at the same time.
Thanks a lot, that helped 🙂
Heya, I have the old problem again, since the update. I set it to AND of course but it had no effect, no matter if I used the OR or the AND search logic
Even deactivated and removed the plugin, re-installed it but that did not work either, any clues?
If you get this solved I get the premium edition. One hand washes another after all 🙂
Hi!
I’ve tried to re-create the issue on my test environment, but it works for me unfortunately, so I’m not sure what is wrong yet.
Let’s try these things:
1. On the General Options -> Behavior panel make sure to change the “Keyword (phrase) logic?” option to “AND”. Save the options a few times as well, just to make sure.
2. Do a few (5-8) test searches on the front-end to see if anything changed.
3. Go to the “Help & Support” panel, and there is a debug data textarea, which you can share with me, there are instructions on how to.
I will look at that data and see how the queries are executed, and how the options are adjusted, and perhaps find the problem as well.
https://paste.ee/p/WchKP
There you go for the debug data, I set the option to AND saved a couple of times, tested it but with no luck
Hi!
I see two possible causes from the information.
1. The exact matches option is enabled, so the keyword logic is ignored, because the keywords entered are not separated, but compared to the fields as one word. You can turn that off on the General Options -> Sources & Basics panel: http://i.imgur.com/DuoAVeA.png
2. I’m not sure if this affects the outcome, but the case sensitivity is also enabled on the Compatibility Options panel: http://i.imgur.com/xIBvnox.png
Try turning that back to “None”, it might change something.
Everything else seems to be ok to me, let’s hope these change something.
Hah you are my hero of the day 😉
The damn case sensitivity was the problem. Problem Solved! Thanks a ton.
I have the same problem. But I don’t know where the Compatibility Options panel is?
I’m using Ajax Search Lite for the moment (I’ve bought the Pro version but can’t get it to activate due to some ssh2 error that I assume is a server problem.)