Start a new topic

How do we implement case-insensitive and partial match searching?

Hi Kinvey support!

Currently we have an iOS app setup which has keyword search functionality. So the user can search for a local company based on the companies name etc.

BUT, the search is not very intuitive at all right now, because it only returns results on EXACT matches.. it has to be the entire name spelled out (not a partial of the name, i.e. only 1 of 2 words) and it has to be exactly the same case (i.e. start with an Uppercase) etc.

I'm working how we can implement a lot more flexibility into how our searching works.. to make it more user friendly.

1 Comment

Checkout the [mongo query docs]( "mongo query docs") for what's possible (we've disabled all uses of $regex but anchored and all uses of $where).

Using business logic, you can do a find() on a collection, supplying an anchored regex as the query:
Login or Signup to post a comment