Jump to content

Fuzzy search for leniency on spelling mistakes


joe_g
 Share

Recommended Posts

Hi there,

I've got a question I suspect there might not be an easy answer for:

Is there a way to do fuzzy search to allow for spelling mistakes? For example, showing results with 1 or 2 characters wrong or missing, or similar?

thanks, j

Link to comment
Share on other sites

If using an AI, why not simply ask it to fix spelling? Then you do the search on the corrected word, AND the user provided (in case AI did a mistake itself).

Edited by da²
Link to comment
Share on other sites

ProcessWire uses MySQL, and as such exposes, through selector queries, a limited (though quite decent) set of options for matching. None of these are truly fuzzy, as MySQL requires quite a bit of additional effort for that type of search result matching. Typically the solution for fuzzy searching is to use a purpose-built engine, such as ElasticSearch, Algolia, Typesense, or similar options.

  • Like 1
Link to comment
Share on other sites

Thanks, i sort of imagined that elasticsearch would be the solution.

My case is a bit different I've got both misspelled words but also a mix of languages. A word can be very similar in another language but not directly misspelled. Interesting suggestions, nevertheless, thanks!

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...