Parse query strings for search