I am trying to search through all entries in a database and from what i understood you need to use ```
strapi.query(‘restaurant’).search({ _q: ‘my search query’, _limit: 10, _start: 20 });
for it.
However i can't figure out well, anything related to it.
When i use axios/postman to send a request "http://localhost:1337/restaurant/list?_limit=50&_q=a"
ctx.query becomes "{ _limit: '50', _q: 'a' }"
However no matter what i add or write to the .search() the result is bad request.
{
"statusCode": 400,
"error": "Bad Request",
"message": "Your filters contain a field 'q' that doesn't appear on your model definition nor its relations"
}
And if i add an entry for "q":anything in models/restaurant.settings.json the response is only []