Start a new topic

How can i search for all the values of a field containing part of the search string in a collection

I need to search for a value in a field and it should return all the values containing the string value. There is a method called withExactMatchForValue:. But i need all the match for value. I can't find a method for this. Can you please guide me, what to do?

Can you provide an example of what you mean?
I need to fetch all the values with a word say "Three" in a field containing values: "Three Dogs", "Two Cats", "Three Rats".

When i search for "Three" i should get "Three Dogs", "Three Cats".

Right now i have to type the entire word to get the results.
Also how can i do it in a custom endpoint?
Using business logic, you can do a `find()` on a collection, supplying an anchored regex as the query:
This might prove useful:

`KCSQuery* q = [KCSQuery queryOnField:@"name" withRegex:[NSString stringWithFormat:@"^.*(?i)%@.*",@"Three"]]; `

I want to do this with the Rest Api. How can I search substring and with case - insensitive?

Login or Signup to post a comment