Reduce criterias to query string