Filtered out new documents (which haven't yet been given a name) from
the search. Made search take an options object since it has a large
number of arguments now.