Added ResultSorter#assign_relevance + test + refactoring