fix(SearchDoc): Change getOriginalQuery() to return complete SQL query (closes #4787)