document search flags fix