Handling omitted spaces (e.g. billgates instead of bill gates)

I know the typo-tolerance algorithm can handle splits and concatenation, but can it be adjusted to match splits that appear in far proximity to one another in the record?

Use case

The user is searching for information on the “Bill and Melinda Gates Foundation” (true legal name) and is searching by foundation name.

If the user searches for bill gates the target record is listed high in results as expected. However, if the user searches for billgates, omitting the space, no results are found.

Search link:
https://www.grantmakers.io/

Thanks in advance for the help!

2 Likes

Hey Chad,

Thanks for your post!

In my opinion, your best option here is to set a searchable keywords attribute for each of the records needing it. This will enable the split operation to work since words will be next to each other.
So in your example, you would add something like the following:

keywords: ["bill gates", "bill foundation"]

And in a small test I did, we can see that it works for the query billgates:

The drawback of this solution is that you don’t have highlighting on the main attribute, but you can still conditionally display the matching keywords as a secondary info on the result, e.g.

BILL AND MELINDA GATES FOUNDATION
Result matching: bill gates
Seattle, WA

Hope this helps, and please tell me how that goes for you.

Cheers,
Julien

1 Like

Very helpful Julien. Thanks so much for the quick response!