Correct filter for searchdoc and generic_search (closes #4069)

+ Correct rule for ')'
+ Add check for filter in generic_search
+ Add TOFU