JAVA-802: Use $query and $orderby in query document instead of query and orderby