1

How to achieve filtered results that handles phonetically similar character in the search results?

In attached screenshots from iOS 11 -> Settings -> Region & Languague: Searching for regions with K also includes Comoros.

I'm experimenting with Predicates/Expressions:

    // Name field matching.
    NSExpression *lhs = [NSExpression expressionForKeyPath:@"title"];
    NSExpression *rhs = [NSExpression expressionForConstantValue:searchString];
    NSPredicate *finalPredicate = [NSComparisonPredicate
                                   predicateWithLeftExpression:lhs
                                   rightExpression:rhs
                                   modifier:NSDirectPredicateModifier
                                   type:NSContainsPredicateOperatorType
                                   options:NSCaseInsensitivePredicateOption];
    [searchItemsPredicate addObject:finalPredicate];

Related Source: Apple Search Table Sample - APLMainTableViewController.m

Search Regions with M Search Regions with K

lal
  • 7,410
  • 7
  • 34
  • 45

0 Answers0