Skip to content
Snippets Groups Projects
Unverified Commit 43053f9e authored by Jorge Luis Middleton's avatar Jorge Luis Middleton Committed by GitHub
Browse files

Update qdrant.mdx documentation (#1770)

parent 93bc0ffd
No related branches found
No related tags found
No related merge requests found
...@@ -56,10 +56,10 @@ const vectorStore = new QdrantVectorStore({ ...@@ -56,10 +56,10 @@ const vectorStore = new QdrantVectorStore({
```ts ```ts
const document = new Document({ text: essay, id_: path }); const document = new Document({ text: essay, id_: path });
const storageContext = await storageContextFromDefaults({ vectorStore });
const index = await VectorStoreIndex.fromDocuments([document], { const index = await VectorStoreIndex.fromDocuments([document], {
vectorStore, storageContext,
}); });
``` ```
## Query the index ## Query the index
...@@ -91,11 +91,11 @@ async function main() { ...@@ -91,11 +91,11 @@ async function main() {
}); });
const document = new Document({ text: essay, id_: path }); const document = new Document({ text: essay, id_: path });
const storageContext = await storageContextFromDefaults({ vectorStore });
const index = await VectorStoreIndex.fromDocuments([document], { const index = await VectorStoreIndex.fromDocuments([document], {
vectorStore, storageContext,
}); });
const queryEngine = index.asQueryEngine(); const queryEngine = index.asQueryEngine();
const response = await queryEngine.query({ const response = await queryEngine.query({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment