Open vikikamath opened 7 years ago
Great question! I'm here to ask about advanced searches also. I was thinking that we should be able to: 1: send a regex to the root in order to check for matches in any collection. (general matching) 2: send a regex to an endpoint (omitting property) in order to check for matches within any properties in that collection. 3: send a regex to search two (or more) collections for matches.
This could mock backend search and be much more fun! Any ideas how to accomplish this?
Currently following forms of HTTP GET Requests are supported:
To mock a Search Component, it would be preferable to find across any fields, in a given Collection. Something like:
A solution might be to provide a
function
that takes a collection input, an [ optional ] searchKey and returns a modified collection that contains an additional array property searchKey . This searchKey array property will contain all keywords pertinent to that record :For example to make
Heroes
search anything, usage would look like :