getEncodedQuery