Passing current query into advanced query directive.