  A method to find exact solutions to nonlinear Schr\"odinger equation, defined
on a line and on a plane, is found by connecting it with second order linear
ordinary differential equation. The connection is essentially made using
Riccati equation. Generalisation of several known solutions is found using this
method, in case of nonlinear Schr\"odinger equation defined on a line. This
method also yields non-singular and singular vortex solutions, when applied to
nonlinear Schr\"odinger equation on a plane.
