The ranking model query is build dynamically