Add method on class DOC to determine the rank of a document given a list of word in the query