Interface DocumentJoiner
- All Superinterfaces:
Function<Map<Query,List<List<org.springframework.ai.document.Document>>>, List<org.springframework.ai.document.Document>>
- All Known Implementing Classes:
ConcatenationDocumentJoiner
public interface DocumentJoiner
extends Function<Map<Query,List<List<org.springframework.ai.document.Document>>>,List<org.springframework.ai.document.Document>>
A component for combining documents retrieved based on multiple queries and from
multiple data sources into a single collection of documents. As part of the joining
process, it can also handle duplicate documents and reciprocal ranking strategies.
- Since:
- 1.0.0
- Author:
- Thomas Vitale
-
Method Details
-
join
List<org.springframework.ai.document.Document> join(Map<Query, List<List<org.springframework.ai.document.Document>>> documentsForQuery) Joins documents retrieved across multiple queries and daa sources.- Parameters:
documentsForQuery- a map of queries and the corresponding list of documents retrieved- Returns:
- a single collection of documents
-
apply
-