  We discuss some of the analytic properties of lens space indices for 4d N=2
theories of class S. The S-duality properties of these theories highly
constrain the lens space indices, and imply in particular that they are
naturally acted upon by a set of commuting difference operators corresponding
to surface defects. We explicitly identify the difference operators to be a
matrix-valued generalization of the elliptic Ruijsenaars-Schneider model. In a
special limit these difference operators can be expressed naturally in terms of
Cherednik operators appearing in the double affine Hecke algebras, with the
eigenfunctions given by non-symmetric Macdonald polynomials.
