Modified Ranker. Moved queryVEctor genration to runquery function