Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Exact search not working
- This topic has 7 replies, 2 voices, and was last updated 9 years ago by
Ernest Marcinko.
-
AuthorPosts
-
May 19, 2017 at 12:40 pm #13151
davisad
ParticipantI’m having trouble with the Exact search setting over on this page: https://dev.thebankofcanton.com/meet-the-team/
I have some town names that contain other town names, one example is Milton and Hamilton. If a user searches for Milton we only want results for Milton. The solution for this seems to be the exact matching option, so I turned that on and gave it a go. I was still having the same results as before. I tried clearing out every cache I could find and making sure the settings are correct and it seems like the Exact search just isn’t working properly. For the sake of making sure it was an issue with exact results matching, I added a new term for towns and added TestTown1, TestTown2, and TestTown21. A search for TestTown2 shows the results for TestTown21 as well as its own results. Instead of 2 results I’m getting 3.
Here’s some pictures of the settings and what I’m seeing:




May 19, 2017 at 12:41 pm #13152davisad
ParticipantOops, the last image should be this:
May 19, 2017 at 12:51 pm #13153Ernest Marcinko
KeymasterHi!
Thank you very much for the proper details!
Exact matching is probably not what you need. I understand that it’s a bit confusing, but matching the whole phrase whithin a text anywhere is also considered as an exact match. It’s more useful whenever expecting multiple search phrases matched against long text fields. It’s due to the limitations of MySQL regarding word boundary recognition and similar things.
I believe you should rahter try turning off the exact matching and use the ‘AND with exact word matches’ logic: http://i.imgur.com/tqyWnan.png
It’s actually a lot more strict logic, and it works best with the index table engine, but will work in some extend with the default one as well.If you want, you can read more about it in the following documentation chapters:
– Index table introduction
– Generating the index table
– Enabling the index table
– Index table FAQI hope this helps!
May 19, 2017 at 8:36 pm #13159davisad
ParticipantThanks, that worked!
Is it possible to do exact word match for only the town field and partial word matching for everything else?
Thanks
May 23, 2017 at 1:00 pm #13194davisad
ParticipantHi,
Just want to check up on this.
If I can’t do exact word search for only one field, that’s fine, just want to confirm if it’s possible or not (and if it is how to go about doing that).
Thanks
May 24, 2017 at 10:40 am #13207Ernest Marcinko
KeymasterHi!
Sorry for the late response, I have completely missed your ticket by accident.
Unfortunately that’s not possible. With a modification it might be, but very likely only for very generic fields like the title or content or the excerpt. The town field is a taxonomy term (category) or a custom field?
Let me know and I will check on a possible modification.May 25, 2017 at 1:06 pm #13224davisad
ParticipantThanks for the response. The town field is a custom field, but I think we’re just going to work with how it currently works for now.
-
This reply was modified 9 years ago by
davisad.
May 26, 2017 at 12:08 pm #13247Ernest Marcinko
KeymasterYou cannot access this content.
-
This reply was modified 9 years ago by
-
AuthorPosts
- The topic ‘Exact search not working’ is closed to new replies.