Thanks for the info, this certainly helps give context on the issue. I took a look at your site and tried running the two queries, “tn225” and “tn-225” (which Algolia’s engine effectively treats the same as “tn 225”). I think I have an idea of what may be going on here. A couple of thoughts:
The query “tn225” is matching 4 results on an attribute other than the post “name/title” (likely inside the “taxonomies” attribute since you’re using Wordpress, or “SKU” attribute as you suggested). As this does not appear to be the desired behavior, I might suggest checking to see if you have “SKU” or “Taxonomies” set as searchable attributes in your dashboard (under Indices > Rankings tab)…if so I would consider whether or not you want to have those be searchable (i.e. do you think your users intend to be actively searching for SKU or taxonomy values?).
While TN225Y (no space, and including the ‘Y’) would indeed match the correct record, the query “tn225” failing to match the attribute value “TN-225Y”, “TN-225C”, or “TN-225M” is a bit of an edge case. In order to successfully match the desired records with this query, the engine must try to find results by splitting the string “tn225” at every position to see if there is a record with an attribute that contains two or more words that match the various sub-words in this query (such as “tn 225”). The engine can do this, however, it cannot simultaneously use the prefix matching feature to identify the correct records which have the suffix “Y”, “C”, and “M” in their name/title attributes.
In order to return more relevant results when your users commit such a specific set of typos, would it be possible to do a bit of pre-processing to your data set before you index it, such as adding an additional attribute to each record that might contain model numbers without any dashes or spaces, to cover the use case of people searching for such?