Troubleshooting Typo Search Functionality in TS

TLDR Martin had issues with typo search in TS. However, it turned out to be a problem with a downstream system after Kishore Nallan assisted with various solutions.

Photo of Martin
Martin
Thu, 17 Aug 2023 12:24:48 UTC

Hey folks, we're currently evaluating TS and it looks great overall but somehow we can't get typo search to work at all. If I search for `spongeb` I get results for `Spongebob`, but when I search for `spongebb` (additional b at the end), then I get _zero_ results. I already tried changing `typo_tokens_threshold` to 2 or 3 and change the min limits, but nothing. Any ideas what I might be doing wrong?

Photo of Kishore Nallan
Kishore Nallan
Thu, 17 Aug 2023 12:39:09 UTC

Try reducing default value for `min_len_2typo` which set to `7`.

Photo of Martin
Martin
Thu, 17 Aug 2023 12:39:35 UTC

thanks, I already reduced that to 5 and no difference

Photo of Kishore Nallan
Kishore Nallan
Thu, 17 Aug 2023 12:39:37 UTC

There's also `min_len_1typo`

Photo of Martin
Martin
Thu, 17 Aug 2023 12:39:42 UTC

I set that to 2

Photo of Kishore Nallan
Kishore Nallan
Thu, 17 Aug 2023 12:40:23 UTC

Are you doing a prefix search? (if you don't send prefix=false it's a prefix search)

Photo of Martin
Martin
Thu, 17 Aug 2023 12:40:47 UTC

I don't set this, so seems I am

Photo of Kishore Nallan
Kishore Nallan
Thu, 17 Aug 2023 12:54:51 UTC

I just tried reproducing this with a single record but could not. Can you post a small fully reproduceable snippet?

Photo of Martin
Martin
Fri, 18 Aug 2023 07:01:26 UTC

it turned out I fooled myself and it was actually an issue with a downstream system. Thanks for your help anyway!