Title: Problem with two keywords
Last modified: September 1, 2016

---

# Problem with two keywords

 *  [Reinhold667](https://wordpress.org/support/users/reinhold667/)
 * (@reinhold667)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/problem-with-two-keywords/)
 * Heya, I have a quite weird problem it seems, wonder if you know a solution
 * There on my site game-art-hq .com the search does not find the articles it “should”
   find.
 * If you type “Terry”, the name of a game character called Terry Bogard, you get
   the most relevant article, a gallery with images of him.
 * But if you write his full name, Terry Bogard, that gallery and other relevant
   articles don’t show up in the search results, instead you get only two results
   from posts from 2011 that had Terry Bogard mentioned in the article.
 * How can I fix this so visitors get the more relevant results?
 * Greets, Reinhold
 * [https://wordpress.org/plugins/ajax-search-lite/](https://wordpress.org/plugins/ajax-search-lite/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [wpdreams](https://wordpress.org/support/users/wpdreams/)
 * (@wpdreams)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/problem-with-two-keywords/#post-7493176)
 * 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.
 *  Thread Starter [Reinhold667](https://wordpress.org/support/users/reinhold667/)
 * (@reinhold667)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/problem-with-two-keywords/#post-7493300)
 * Thanks a lot, that helped 🙂
 *  Thread Starter [Reinhold667](https://wordpress.org/support/users/reinhold667/)
 * (@reinhold667)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/problem-with-two-keywords/#post-7493332)
 * 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 🙂
 *  Plugin Author [wpdreams](https://wordpress.org/support/users/wpdreams/)
 * (@wpdreams)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/problem-with-two-keywords/#post-7493333)
 * 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.
 *  Thread Starter [Reinhold667](https://wordpress.org/support/users/reinhold667/)
 * (@reinhold667)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/problem-with-two-keywords/#post-7493334)
 * [https://paste.ee/p/WchKP](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
 *  Plugin Author [wpdreams](https://wordpress.org/support/users/wpdreams/)
 * (@wpdreams)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/problem-with-two-keywords/#post-7493335)
 * 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](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](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.
 *  Thread Starter [Reinhold667](https://wordpress.org/support/users/reinhold667/)
 * (@reinhold667)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/problem-with-two-keywords/#post-7493338)
 * Hah you are my hero of the day 😉
 * The damn case sensitivity was the problem. Problem Solved! Thanks a ton.
 *  [terriz](https://wordpress.org/support/users/terriz/)
 * (@terriz)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/problem-with-two-keywords/#post-9173589)
 * 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.)

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Problem with two keywords’ is closed to new replies.

 * ![](https://ps.w.org/ajax-search-lite/assets/icon-256x256.png?rev=3192672)
 * [Ajax Search Lite - Live Search & Filter](https://wordpress.org/plugins/ajax-search-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ajax-search-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ajax-search-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/ajax-search-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ajax-search-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ajax-search-lite/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [terriz](https://wordpress.org/support/users/terriz/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/problem-with-two-keywords/#post-9173589)
 * Status: not resolved