Save search history to be used later for autocomplete and statistics