Skip to content

Commit 56b5dd3

Browse files
authored
docs : fix qdrant retriever examples (#11535)
1 parent ef1fcd3 commit 56b5dd3

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

docs-website/docs/pipeline-components/retrievers/qdranthybridretriever.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ A Retriever based both on dense and sparse embeddings, compatible with the Qdran
1616
| **Most common position in a pipeline** | 1\. After a Text Embedder and before a [`PromptBuilder`](../builders/promptbuilder.mdx) in a RAG pipeline <br /> <br />2. The last component in a hybrid search pipeline <br /> 3. After a Text Embedder and before an [`ExtractiveReader`](../readers/extractivereader.mdx) in an extractive QA pipeline |
1717
| **Mandatory init variables** | `document_store`: An instance of a [QdrantDocumentStore](../../document-stores/qdrant-document-store.mdx) |
1818
| **Mandatory run variables** | `query_embedding`: A dense vector representing the query (a list of floats) <br /> <br />`query_sparse_embedding`: A [`SparseEmbedding`](../../concepts/data-classes.mdx#sparseembedding) object containing a vectorial representation of the query |
19-
| **Output variables** | `document`: A list of documents |
19+
| **Output variables** | `documents`: A list of documents |
2020
| **API reference** | [Qdrant](/reference/integrations-qdrant) |
2121
| **GitHub link** | https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/qdrant |
2222
| **Package name** | `qdrant-haystack` |
@@ -170,14 +170,14 @@ querying.connect("dense_text_embedder.embedding", "retriever.query_embedding")
170170

171171
question = "Who supports fastembed?"
172172

173-
results = query_mix.run(
173+
results = querying.run(
174174
{
175175
"dense_text_embedder": {"text": question},
176176
"sparse_text_embedder": {"text": question},
177177
},
178178
)
179179

180-
print(result["retriever"]["documents"][0])
180+
print(results["retriever"]["documents"][0])
181181

182182
# Document(id=...,
183183
# content: 'fastembed is supported by and maintained by Qdrant.',

docs-website/docs/pipeline-components/retrievers/qdrantsparseembeddingretriever.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ from haystack_integrations.components.retrievers.qdrant import (
100100
from haystack_integrations.document_stores.qdrant import QdrantDocumentStore
101101
from haystack.document_stores.types import DuplicatePolicy
102102
from haystack_integrations.components.embedders.fastembed import (
103-
FastembedDocumentEmbedder,
104-
FastembedTextEmbedder,
103+
FastembedSparseDocumentEmbedder,
104+
FastembedSparseTextEmbedder,
105105
)
106106

107107
document_store = QdrantDocumentStore(

docs-website/versioned_docs/version-2.30/pipeline-components/retrievers/qdranthybridretriever.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ A Retriever based both on dense and sparse embeddings, compatible with the Qdran
1616
| **Most common position in a pipeline** | 1\. After a Text Embedder and before a [`PromptBuilder`](../builders/promptbuilder.mdx) in a RAG pipeline <br /> <br />2. The last component in a hybrid search pipeline <br /> 3. After a Text Embedder and before an [`ExtractiveReader`](../readers/extractivereader.mdx) in an extractive QA pipeline |
1717
| **Mandatory init variables** | `document_store`: An instance of a [QdrantDocumentStore](../../document-stores/qdrant-document-store.mdx) |
1818
| **Mandatory run variables** | `query_embedding`: A dense vector representing the query (a list of floats) <br /> <br />`query_sparse_embedding`: A [`SparseEmbedding`](../../concepts/data-classes.mdx#sparseembedding) object containing a vectorial representation of the query |
19-
| **Output variables** | `document`: A list of documents |
19+
| **Output variables** | `documents`: A list of documents |
2020
| **API reference** | [Qdrant](/reference/integrations-qdrant) |
2121
| **GitHub link** | https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/qdrant |
2222
| **Package name** | `qdrant-haystack` |
@@ -170,14 +170,14 @@ querying.connect("dense_text_embedder.embedding", "retriever.query_embedding")
170170

171171
question = "Who supports fastembed?"
172172

173-
results = query_mix.run(
173+
results = querying.run(
174174
{
175175
"dense_text_embedder": {"text": question},
176176
"sparse_text_embedder": {"text": question},
177177
},
178178
)
179179

180-
print(result["retriever"]["documents"][0])
180+
print(results["retriever"]["documents"][0])
181181

182182
# Document(id=...,
183183
# content: 'fastembed is supported by and maintained by Qdrant.',

docs-website/versioned_docs/version-2.30/pipeline-components/retrievers/qdrantsparseembeddingretriever.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ from haystack_integrations.components.retrievers.qdrant import (
100100
from haystack_integrations.document_stores.qdrant import QdrantDocumentStore
101101
from haystack.document_stores.types import DuplicatePolicy
102102
from haystack_integrations.components.embedders.fastembed import (
103-
FastembedDocumentEmbedder,
104-
FastembedTextEmbedder,
103+
FastembedSparseDocumentEmbedder,
104+
FastembedSparseTextEmbedder,
105105
)
106106

107107
document_store = QdrantDocumentStore(

0 commit comments

Comments
 (0)