@@ -12,6 +12,7 @@ class QdrantEmbeddingRetriever:
12
12
13
13
Usage example:
14
14
```python
15
+ from haystack.dataclasses import Document
15
16
from haystack_integrations.components.retrievers.qdrant import QdrantEmbeddingRetriever
16
17
from haystack_integrations.document_stores.qdrant import QdrantDocumentStore
17
18
@@ -42,12 +43,12 @@ def __init__(
42
43
Create a QdrantEmbeddingRetriever component.
43
44
44
45
:param document_store: An instance of QdrantDocumentStore.
45
- :param filters: A dictionary with filters to narrow down the search space. Default is None.
46
- :param top_k: The maximum number of documents to retrieve. Default is 10.
47
- :param scale_score: Whether to scale the scores of the retrieved documents or not. Default is True.
48
- :param return_embedding: Whether to return the embedding of the retrieved Documents. Default is False.
46
+ :param filters: A dictionary with filters to narrow down the search space.
47
+ :param top_k: The maximum number of documents to retrieve.
48
+ :param scale_score: Whether to scale the scores of the retrieved documents or not.
49
+ :param return_embedding: Whether to return the embedding of the retrieved Documents.
49
50
50
- :raises ValueError: If ' document_store' is not an instance of QdrantDocumentStore.
51
+ :raises ValueError: If ` document_store` is not an instance of ` QdrantDocumentStore` .
51
52
"""
52
53
53
54
if not isinstance (document_store , QdrantDocumentStore ):
@@ -134,7 +135,7 @@ class QdrantSparseEmbeddingRetriever:
134
135
```python
135
136
from haystack_integrations.components.retrievers.qdrant import QdrantSparseEmbeddingRetriever
136
137
from haystack_integrations.document_stores.qdrant import QdrantDocumentStore
137
- from haystack.dataclasses.sparse_embedding import SparseEmbedding
138
+ from haystack.dataclasses import Document, SparseEmbedding
138
139
139
140
document_store = QdrantDocumentStore(
140
141
":memory:",
@@ -164,12 +165,12 @@ def __init__(
164
165
Create a QdrantSparseEmbeddingRetriever component.
165
166
166
167
:param document_store: An instance of QdrantDocumentStore.
167
- :param filters: A dictionary with filters to narrow down the search space. Default is None.
168
- :param top_k: The maximum number of documents to retrieve. Default is 10.
169
- :param scale_score: Whether to scale the scores of the retrieved documents or not. Default is True.
170
- :param return_embedding: Whether to return the sparse embedding of the retrieved Documents. Default is False.
168
+ :param filters: A dictionary with filters to narrow down the search space.
169
+ :param top_k: The maximum number of documents to retrieve.
170
+ :param scale_score: Whether to scale the scores of the retrieved documents or not.
171
+ :param return_embedding: Whether to return the sparse embedding of the retrieved Documents.
171
172
172
- :raises ValueError: If ' document_store' is not an instance of QdrantDocumentStore.
173
+ :raises ValueError: If ` document_store` is not an instance of ` QdrantDocumentStore` .
173
174
"""
174
175
175
176
if not isinstance (document_store , QdrantDocumentStore ):
@@ -257,7 +258,7 @@ class QdrantHybridRetriever:
257
258
```python
258
259
from haystack_integrations.components.retrievers.qdrant import QdrantHybridRetriever
259
260
from haystack_integrations.document_stores.qdrant import QdrantDocumentStore
260
- from haystack.dataclasses.sparse_embedding import SparseEmbedding
261
+ from haystack.dataclasses import Document, SparseEmbedding
261
262
262
263
document_store = QdrantDocumentStore(
263
264
":memory:",
0 commit comments