I've been trying to come up with a way to properly fuzzy search using my Front End Database that calls a MySQL database.
At the moment, when someone searches, a PHP
file is fired that calls a request to MySQL
and MySQL does some pseudo fuzzy searching using Full Text Search
and returns the closest match. This has worked semi-decently.
Today I came up with the idea of having the user load a full JSON file of the DB into their local storage when they load a page, then when they search it simply uses Javascript RegExp
to filter through the JSON file stored in local storage to find the closest match.
However, I am worried that performance may be an issue or that this may be an extremely inefficient way of doing this.
Would storing a large (~7mb) JSON file into Local Storage be a bad idea?