Added method for getting the recommendation query