Result filtering on search (also known as Partial Search)

First take at refactoring search to allow selective results, rather than returning the whole thing.
Nice!  It'd be great to name the variable 'o' something that's related to what this each block is doing.  Maybe 'row'?