Result filtering on search (also known as Partial Search)

First take at refactoring search to allow selective results, rather than returning the whole thing.
Also, we should make a subclass of `ArgumentError` with a specific and informative name, since it's displayed prominently in error messaging. Something like `SearchError` is still too generic, since lots of things can go wrong with search. I'd favor something like `InvalidSearchQuery`.