check for previous entries of queries to avoid logging the same query when user requests more search results pages.