Interface DocumentRanker

All Superinterfaces:
BiFunction<Query,List<Document>,List<Document>>

@Deprecated public interface DocumentRanker extends BiFunction<Query,List<Document>,List<Document>>
Deprecated.
in favour of DocumentPostProcessor.
A component for ordering and ranking documents based on their relevance to a query to bring the most relevant documents to the top of the list, addressing challenges such as "lost-in-the-middle".

Unlike DocumentSelector, this component does not remove entire documents from the list, but rather changes the order/score of the documents in the list. Unlike DocumentCompressor, this component does not alter the content of the documents.

  • Method Summary

    Modifier and Type
    Method
    Description
    default List<Document>
    apply(Query query, List<Document> documents)
    Deprecated.
     
    rank(Query query, List<Document> documents)
    Deprecated.
    Ranks documents based on their relevance to the given query.

    Methods inherited from interface java.util.function.BiFunction

    andThen