(#4)  Add filter function option

Add an option to filter out documents from the search index.  
This is for issue #4.
if you add `db.emit('error')`, you can also add a nice test here using `db.on('error')` to confirm that an error was bubbled up to the user.  (If the user uses `db.on('error')`, then the error won't be written to the console.)