The closed-form expressions of the Schur indices and line defect correlation functions of four-dimensional $N=2$* $U(N)$ gauge theory are obtained by using the Fermi-gas method. These functions can be expressed in terms of the twisted Weierstrass functions as well as several generating functions for combinatorial objects, including the overpartitions, plane partition diamonds.