Exact search not working

This topic contains 7 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 6 years, 10 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #13151
    davisad
    davisad
    Participant

    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:





    #13152
    davisad
    davisad
    Participant

    Oops, the last image should be this:

    #13153
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    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 FAQ

    I hope this helps!

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #13159
    davisad
    davisad
    Participant

    Thanks, that worked!

    Is it possible to do exact word match for only the town field and partial word matching for everything else?

    Thanks

    #13194
    davisad
    davisad
    Participant

    Hi,

    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

    #13207
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #13224
    davisad
    davisad
    Participant

    Thanks 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 davisad.
    #13247
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


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

The topic ‘Exact search not working’ is closed to new replies.