Query based weights