Closed b-ryan closed 6 years ago
Yes, that's possible. You'll need to override the default instances function with your own search implementation: https://github.com/biosustain/potion/blob/master/flask_potion/resource.py#L263-L265
A simpler approach would be to add a custom search endpoint, e.g. http :5000/author/search q=='xyz'
.
Excellent - thanks
I want to provide a way to search by multiple fields at once. Let's say in the books / authors example in the docs I wanted to make a request like:
The endpoint could return any results where the author has 'xyz' in their first or last name. Maybe it might even return authors who have a book with 'xyz' in the title.
Is this possible?