Encode the query string for registy search