Since documents is the list containing Documentobjects
document variable should be documents
vectorStore.add(List.of(document)); -> vectorStore.add(documents);
Since documents is the list containing Documentobjects
document variable should be documents
vectorStore.add(List.of(document)); -> vectorStore.add(documents);