From 43053f9e1683c5d185d62e67175f5a38edb6d1b4 Mon Sep 17 00:00:00 2001 From: Jorge Luis Middleton <jorge.middleton@gmail.com> Date: Fri, 21 Mar 2025 19:06:25 +1100 Subject: [PATCH] Update qdrant.mdx documentation (#1770) --- .../modules/data_stores/vector_stores/qdrant.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/next/src/content/docs/llamaindex/modules/data_stores/vector_stores/qdrant.mdx b/apps/next/src/content/docs/llamaindex/modules/data_stores/vector_stores/qdrant.mdx index 5b86585b1..05e506b4b 100644 --- a/apps/next/src/content/docs/llamaindex/modules/data_stores/vector_stores/qdrant.mdx +++ b/apps/next/src/content/docs/llamaindex/modules/data_stores/vector_stores/qdrant.mdx @@ -56,10 +56,10 @@ const vectorStore = new QdrantVectorStore({ ```ts const document = new Document({ text: essay, id_: path }); - -const index = await VectorStoreIndex.fromDocuments([document], { - vectorStore, -}); +const storageContext = await storageContextFromDefaults({ vectorStore }); + const index = await VectorStoreIndex.fromDocuments([document], { + storageContext, + }); ``` ## Query the index @@ -91,11 +91,11 @@ async function main() { }); const document = new Document({ text: essay, id_: path }); - + const storageContext = await storageContextFromDefaults({ vectorStore }); const index = await VectorStoreIndex.fromDocuments([document], { - vectorStore, + storageContext, }); - + const queryEngine = index.asQueryEngine(); const response = await queryEngine.query({ -- GitLab