Class ConcatenationDocumentJoiner
java.lang.Object
org.springframework.ai.rag.retrieval.join.ConcatenationDocumentJoiner
- All Implemented Interfaces:
Function<Map<Query,
,List<List<Document>>>, List<Document>> DocumentJoiner
Combines documents retrieved based on multiple queries and from multiple data sources
by concatenating them into a single collection of documents. In case of duplicate
documents, the first occurrence is kept. The score of each document is kept as is.
- Since:
- 1.0.0
- Author:
- Thomas Vitale
-
Constructor Details
-
ConcatenationDocumentJoiner
public ConcatenationDocumentJoiner()
-
-
Method Details
-
join
Description copied from interface:DocumentJoiner
Joins documents retrieved across multiple queries and daa sources.- Specified by:
join
in interfaceDocumentJoiner
- Parameters:
documentsForQuery
- a map of queries and the corresponding list of documents retrieved- Returns:
- a single collection of documents
-