Now generating query string instead of match clauses