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

3
  • What app is the screen shot from? Apr 17, 2018 at 16:56
  • Updated screenshot source app: iOS 11 --> Settings --> Region & Languague
    – lal
    Apr 17, 2018 at 17:01
  • Should I add other keywords to improve this question surfacing up on search? This seems like many devs would need to solve.
    – lal
    May 24, 2018 at 17:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.