Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Exact search not working
This topic contains 7 replies, has 2 voices, and was last updated by Ernest Marcinko 6 years, 10 months ago.
- AuthorPosts
- May 19, 2017 at 12:40 pm #13151
I’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 #13152Oops, the last image should be this:
May 19, 2017 at 12:51 pm #13153Hi!
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: https://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!
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 19, 2017 at 8:36 pm #13159Thanks, 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 #13194Hi,
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 #13207Hi!
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?
Best,
Let me know and I will check on a possible modification.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 25, 2017 at 1:06 pm #13224Thanks 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 6 years, 10 months ago by davisad.
May 26, 2017 at 12:08 pm #13247You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
The topic ‘Exact search not working’ is closed to new replies.