Return the matched logs if there is a search query