We rolled out a new and better SDK for you.

Fuzziness parameter

Help your users even more with Fuzzy Search. Use the right fuzziness levels in your app to make it less sensitive to typos. Sample use case: You occasionally make mistakes when typing. Your app still returns the desired search results.

Use the following code snippet to try this in your app.

  • Level 1 uses no spell checking.
  • Level 2 is using normal n-gram spell checking. For example, a query "restrant" can be matched to " restaurant".
  • Level 3 is using sound-like spell checking and shingle spell checking. Sound-like spell checking is for "rstrnt" to "restaurant" matching. Shingle spell checking is for "mountainview" to " mountain view" matching.
  • Level 4 doesn’t add any more spell checking functionality.

The search engine will start looking for a match on the level defined by minFuzzyLevel and will stop searching at the level specified by maxFuzzyLevel.

1let query = TTSearchQueryBuilder.create(withTerm: term)
2 .withMinFuzzyLevel(1)
3 .withMaxFuzzyLevel(maxFuzzyLevel)
4 .withPosition(locationManager.lastLocation!.coordinate)
5 .build() query)
TTSearchQuery *query = [[[[[TTSearchQueryBuilder createWithTerm:term] withMinFuzzyLevel:1] withMaxFuzzyLevel:maxFuzzyLevel] withPosition:self.locationManager.lastLocation.coordinate] build]
[ searchWithQuery:query];