(#4)  Add filter function option

Add an option to filter out documents from the search index.  
This is for issue #4.