Algorithm that ranks documents against each other