Added primative API that runQuery on index