From the lecture notes https://canvas.harvard.edu/courses/39684/files/folder/Lectures?preview=5387008 by Subir Sachdev,
the path-integral of 1D XY-model is given by
$$\mathcal{Z}=\int\mathcal{D}\theta\exp{\left\{-\frac{K}{2}\int dx(\frac{d\theta}{dx})^{2}\right\}}$$
Introducing a complex order parameter $\psi=e^{i\theta},$ the correlation function is given by
$$\left\langle\psi(x)\psi^{\ast}(0)\right\rangle=\exp{\left(-\frac{1}{K}\int\frac{dk}{2\pi}\frac{1-\cos(kx)}{k^{2}}\right)}$$
My question is how I should perform the path-integral to obtain the above correlation function. I also posted my question at https://physics.stackexchange.com/questions/395511/correlation-function-of-one-dimensional-xy-model