added ordering support for text queries