qdrant-haystack 8.1.0__tar.gz → 9.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of qdrant-haystack might be problematic. Click here for more details.
- {qdrant_haystack-8.1.0 → qdrant_haystack-9.0.0}/CHANGELOG.md +11 -0
- {qdrant_haystack-8.1.0 → qdrant_haystack-9.0.0}/PKG-INFO +2 -2
- {qdrant_haystack-8.1.0 → qdrant_haystack-9.0.0}/pyproject.toml +1 -1
- {qdrant_haystack-8.1.0 → qdrant_haystack-9.0.0}/src/haystack_integrations/document_stores/qdrant/converters.py +1 -17
- {qdrant_haystack-8.1.0 → qdrant_haystack-9.0.0}/src/haystack_integrations/document_stores/qdrant/document_store.py +1 -2
- {qdrant_haystack-8.1.0 → qdrant_haystack-9.0.0}/src/haystack_integrations/document_stores/qdrant/migrate_to_sparse.py +4 -3
- {qdrant_haystack-8.1.0 → qdrant_haystack-9.0.0}/tests/test_converters.py +0 -44
- {qdrant_haystack-8.1.0 → qdrant_haystack-9.0.0}/.gitignore +0 -0
- {qdrant_haystack-8.1.0 → qdrant_haystack-9.0.0}/LICENSE.txt +0 -0
- {qdrant_haystack-8.1.0 → qdrant_haystack-9.0.0}/README.md +0 -0
- {qdrant_haystack-8.1.0 → qdrant_haystack-9.0.0}/examples/embedding_retrieval.py +0 -0
- {qdrant_haystack-8.1.0 → qdrant_haystack-9.0.0}/pydoc/config.yml +0 -0
- {qdrant_haystack-8.1.0 → qdrant_haystack-9.0.0}/src/haystack_integrations/components/retrievers/qdrant/__init__.py +0 -0
- {qdrant_haystack-8.1.0 → qdrant_haystack-9.0.0}/src/haystack_integrations/components/retrievers/qdrant/retriever.py +0 -0
- {qdrant_haystack-8.1.0 → qdrant_haystack-9.0.0}/src/haystack_integrations/document_stores/qdrant/__init__.py +0 -0
- {qdrant_haystack-8.1.0 → qdrant_haystack-9.0.0}/src/haystack_integrations/document_stores/qdrant/filters.py +0 -0
- {qdrant_haystack-8.1.0 → qdrant_haystack-9.0.0}/tests/__init__.py +0 -0
- {qdrant_haystack-8.1.0 → qdrant_haystack-9.0.0}/tests/conftest.py +0 -0
- {qdrant_haystack-8.1.0 → qdrant_haystack-9.0.0}/tests/test_dict_converters.py +0 -0
- {qdrant_haystack-8.1.0 → qdrant_haystack-9.0.0}/tests/test_document_store.py +0 -0
- {qdrant_haystack-8.1.0 → qdrant_haystack-9.0.0}/tests/test_filters.py +0 -0
- {qdrant_haystack-8.1.0 → qdrant_haystack-9.0.0}/tests/test_retriever.py +0 -0
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [integrations/qdrant-v8.1.0] - 2025-03-07
|
|
4
|
+
|
|
5
|
+
### 🧹 Chores
|
|
6
|
+
|
|
7
|
+
- Remove Python 3.8 support (#1421)
|
|
8
|
+
|
|
9
|
+
### 🌀 Miscellaneous
|
|
10
|
+
|
|
11
|
+
- Docs: Update document store descriptions for deepset Pipeline Builder (#1447)
|
|
12
|
+
- Refactor: Qdrant - raise error if existing collection is not compatible with Haystack (#1481)
|
|
13
|
+
|
|
3
14
|
## [integrations/qdrant-v8.0.0] - 2025-02-19
|
|
4
15
|
|
|
5
16
|
### 🧹 Chores
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: qdrant-haystack
|
|
3
|
-
Version:
|
|
3
|
+
Version: 9.0.0
|
|
4
4
|
Summary: An integration of Qdrant ANN vector database backend with Haystack
|
|
5
5
|
Project-URL: Source, https://github.com/deepset-ai/haystack-core-integrations
|
|
6
6
|
Project-URL: Documentation, https://github.com/deepset-ai/haystack-core-integrations/blob/main/integrations/qdrant/README.md
|
|
@@ -18,7 +18,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
18
18
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
19
19
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
20
20
|
Requires-Python: >=3.9
|
|
21
|
-
Requires-Dist: haystack-ai
|
|
21
|
+
Requires-Dist: haystack-ai>=2.11.0
|
|
22
22
|
Requires-Dist: qdrant-client>=1.10.0
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
|
|
@@ -25,7 +25,7 @@ classifiers = [
|
|
|
25
25
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
26
26
|
"Programming Language :: Python :: Implementation :: PyPy",
|
|
27
27
|
]
|
|
28
|
-
dependencies = ["haystack-ai", "qdrant-client>=1.10.0"]
|
|
28
|
+
dependencies = ["haystack-ai>=2.11.0", "qdrant-client>=1.10.0"]
|
|
29
29
|
|
|
30
30
|
[project.urls]
|
|
31
31
|
Source = "https://github.com/deepset-ai/haystack-core-integrations"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import logging
|
|
2
1
|
import uuid
|
|
3
2
|
from typing import List, Union
|
|
4
3
|
|
|
4
|
+
from haystack import logging
|
|
5
5
|
from haystack.dataclasses import Document
|
|
6
6
|
from qdrant_client.http import models as rest
|
|
7
7
|
|
|
@@ -23,14 +23,6 @@ def convert_haystack_documents_to_qdrant_points(
|
|
|
23
23
|
for document in documents:
|
|
24
24
|
payload = document.to_dict(flatten=False)
|
|
25
25
|
|
|
26
|
-
if payload.pop("dataframe", None):
|
|
27
|
-
logger.warning(
|
|
28
|
-
"Document %s has the `dataframe` field set,"
|
|
29
|
-
"QdrantDocumentStore no longer supports dataframes and this field will be ignored. "
|
|
30
|
-
"The `dataframe` field will soon be removed from Haystack Document.",
|
|
31
|
-
document.id,
|
|
32
|
-
)
|
|
33
|
-
|
|
34
26
|
if use_sparse_embeddings:
|
|
35
27
|
vector = {}
|
|
36
28
|
|
|
@@ -73,14 +65,6 @@ def convert_qdrant_point_to_haystack_document(point: QdrantPoint, use_sparse_emb
|
|
|
73
65
|
payload = {**point.payload}
|
|
74
66
|
payload["score"] = point.score if hasattr(point, "score") else None
|
|
75
67
|
|
|
76
|
-
if payload.pop("dataframe", None):
|
|
77
|
-
logger.warning(
|
|
78
|
-
"Document %s has the `dataframe` field set,"
|
|
79
|
-
"QdrantDocumentStore no longer supports dataframes and this field will be ignored. "
|
|
80
|
-
"The `dataframe` field will soon be removed from Haystack Document.",
|
|
81
|
-
payload["id"],
|
|
82
|
-
)
|
|
83
|
-
|
|
84
68
|
if not use_sparse_embeddings:
|
|
85
69
|
payload["embedding"] = point.vector if hasattr(point, "vector") else None
|
|
86
70
|
elif hasattr(point, "vector") and point.vector is not None:
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import inspect
|
|
2
|
-
import logging
|
|
3
2
|
from itertools import islice
|
|
4
3
|
from typing import Any, ClassVar, Dict, Generator, List, Optional, Set, Union
|
|
5
4
|
|
|
6
5
|
import numpy as np
|
|
7
6
|
import qdrant_client
|
|
8
|
-
from haystack import default_from_dict, default_to_dict
|
|
7
|
+
from haystack import default_from_dict, default_to_dict, logging
|
|
9
8
|
from haystack.dataclasses import Document
|
|
10
9
|
from haystack.dataclasses.sparse_embedding import SparseEmbedding
|
|
11
10
|
from haystack.document_stores.errors import DocumentStoreError, DuplicateDocumentError
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import logging
|
|
1
|
+
import logging as python_logging
|
|
2
2
|
import time
|
|
3
3
|
|
|
4
|
+
from haystack import logging
|
|
4
5
|
from qdrant_client.http import models
|
|
5
6
|
|
|
6
7
|
from haystack_integrations.document_stores.qdrant import QdrantDocumentStore
|
|
7
8
|
|
|
8
9
|
logger = logging.getLogger(__name__)
|
|
9
|
-
logger.addHandler(
|
|
10
|
-
logger.setLevel(
|
|
10
|
+
logger.addHandler(python_logging.StreamHandler())
|
|
11
|
+
logger.setLevel(python_logging.INFO)
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
def migrate_to_sparse_embeddings_support(old_document_store: QdrantDocumentStore, new_index: str):
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import numpy as np
|
|
2
|
-
from haystack import Document
|
|
3
|
-
from pandas import DataFrame
|
|
4
2
|
from qdrant_client.http import models as rest
|
|
5
3
|
|
|
6
4
|
from haystack_integrations.document_stores.qdrant.converters import (
|
|
7
|
-
convert_haystack_documents_to_qdrant_points,
|
|
8
5
|
convert_id,
|
|
9
6
|
convert_qdrant_point_to_haystack_document,
|
|
10
7
|
)
|
|
@@ -65,44 +62,3 @@ def test_point_to_document_reverts_proper_structure_from_record_without_sparse()
|
|
|
65
62
|
assert document.sparse_embedding is None
|
|
66
63
|
assert {"test_field": 1} == document.meta
|
|
67
64
|
assert 0.0 == np.sum(np.array([1.0, 0.0, 0.0, 0.0]) - document.embedding)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
def test_point_to_document_skips_dataframe():
|
|
71
|
-
|
|
72
|
-
point = rest.Record(
|
|
73
|
-
id="c7c62e8e-02b9-4ec6-9f88-46bd97b628b7",
|
|
74
|
-
payload={
|
|
75
|
-
"id": "my-id",
|
|
76
|
-
"content": "Lorem ipsum",
|
|
77
|
-
"content_type": "text",
|
|
78
|
-
"meta": {
|
|
79
|
-
"test_field": 1,
|
|
80
|
-
},
|
|
81
|
-
"dataframe": {"a": [1, 2, 3]},
|
|
82
|
-
},
|
|
83
|
-
vector=[1.0, 0.0, 0.0, 0.0],
|
|
84
|
-
)
|
|
85
|
-
document = convert_qdrant_point_to_haystack_document(point, use_sparse_embeddings=False)
|
|
86
|
-
assert "my-id" == document.id
|
|
87
|
-
assert "Lorem ipsum" == document.content
|
|
88
|
-
assert "text" == document.content_type
|
|
89
|
-
assert {"test_field": 1} == document.meta
|
|
90
|
-
assert 0.0 == np.sum(np.array([1.0, 0.0, 0.0, 0.0]) - document.embedding)
|
|
91
|
-
assert not hasattr(document, "dataframe") or document.dataframe is None
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
def test_documents_to_points_skips_dataframe():
|
|
95
|
-
doc = Document(
|
|
96
|
-
id="my-id",
|
|
97
|
-
content="Lorem ipsum",
|
|
98
|
-
embedding=[1.0, 0.0, 0.0, 0.0],
|
|
99
|
-
)
|
|
100
|
-
|
|
101
|
-
doc.dataframe = DataFrame([[1, 2], [3, 4]])
|
|
102
|
-
|
|
103
|
-
points = convert_haystack_documents_to_qdrant_points([doc], use_sparse_embeddings=False)
|
|
104
|
-
assert len(points) == 1
|
|
105
|
-
|
|
106
|
-
assert points[0].payload["content"] == "Lorem ipsum"
|
|
107
|
-
assert points[0].vector == [1.0, 0.0, 0.0, 0.0]
|
|
108
|
-
assert "dataframe" not in points[0].payload
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|