Neither indexing nor querying does the ranking. Ranking is done after indexing and can be either tf-idf , pagerank or combination of that.
Once the document similarity to the query is calculated, by for example vector space model, the documents are ranked by pagerank.
What OP is saying that instead of pagerank we can have other ranking methods which is surely plausible.