Ranking model construction is an important topic in web mining. Recently, many approaches based on the idea of "learning to rank" have been proposed for this task and most of them attempt to score all documents of different queries by resorting to a single function. In this paper, we propose a novel framework of query-dependent ranking. A simple similarity measure is used to calculate similarities between queries. An individual ranking model is constructed for each training query with corresponding documents. When a new query is asked, documents retrieved for the new query are ranked according to the scores determined by a ranking model which is combined from the models of similar training queries. A mechanism for determining combining weights is also provided. Experimental results show that this query-dependent ranking approach is more effective than other approaches.