From 0e2e16b06e4cf384c090842e42692a2ddf34a9bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Mon, 15 Dec 2025 11:42:30 +0100 Subject: [PATCH] [Doc] Fix documentation about Indexer --- docs/components/store.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/components/store.rst b/docs/components/store.rst index cc644f1d8..d1f96336a 100644 --- a/docs/components/store.rst +++ b/docs/components/store.rst @@ -29,9 +29,10 @@ used vector store:: use Symfony\AI\Store\Document\TextDocument; use Symfony\AI\Store\Indexer; - $indexer = new Indexer($platform, $model, $store); - $document = new TextDocument('This is a sample document.'); - $indexer->index($document); + $document = [new TextDocument('This is a sample document.')]; + $loader = new InMemoryLoader($documents) + $indexer = new Indexer($loader, $vectorizer, $store); + $indexer->index(); You can find more advanced usage in combination with an Agent using the store for RAG in the examples folder.