pass in List<Document> for the pipeline instead.