correct double return of search when query fail (refs #4303)
add exception in SearchDoc::join() (refs #4299, refs #4300)
also generalize exception to addGeneralFile