How do you rank query results?

Rank documents according to their proximity to the query

proximity = similarity of vectors proximity ~ inverse of distance

Formal definition

Use vector angle to rank.