pgvector-haystack 5.5.0__tar.gz → 6.1.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.
Files changed (27) hide show
  1. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/CHANGELOG.md +18 -0
  2. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/PKG-INFO +3 -4
  3. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/pyproject.toml +3 -9
  4. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/src/haystack_integrations/components/retrievers/pgvector/embedding_retriever.py +10 -10
  5. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/src/haystack_integrations/components/retrievers/pgvector/keyword_retriever.py +7 -7
  6. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/src/haystack_integrations/document_stores/pgvector/document_store.py +628 -34
  7. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/src/haystack_integrations/document_stores/pgvector/filters.py +2 -2
  8. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/tests/test_document_store.py +316 -1
  9. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/tests/test_document_store_async.py +349 -0
  10. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/tests/test_filters.py +1 -1
  11. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/.gitignore +0 -0
  12. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/LICENSE.txt +0 -0
  13. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/README.md +0 -0
  14. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/examples/embedding_retrieval.py +0 -0
  15. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/examples/hybrid_retrieval.py +0 -0
  16. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/pydoc/config_docusaurus.yml +0 -0
  17. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/src/haystack_integrations/components/retrievers/pgvector/__init__.py +0 -0
  18. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/src/haystack_integrations/components/retrievers/py.typed +0 -0
  19. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/src/haystack_integrations/document_stores/pgvector/__init__.py +0 -0
  20. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/src/haystack_integrations/document_stores/pgvector/converters.py +0 -0
  21. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/src/haystack_integrations/document_stores/py.typed +0 -0
  22. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/tests/__init__.py +0 -0
  23. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/tests/conftest.py +0 -0
  24. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/tests/test_converters.py +0 -0
  25. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/tests/test_retrieval.py +0 -0
  26. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/tests/test_retrieval_async.py +0 -0
  27. {pgvector_haystack-5.5.0 → pgvector_haystack-6.1.0}/tests/test_retrievers.py +0 -0
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## [integrations/pgvector-v6.0.0] - 2026-01-12
4
+
5
+ ### 🧹 Chores
6
+
7
+ - Make fmt command more forgiving (#2671)
8
+ - [**breaking**] Pgvector - drop Python 3.9 and use X|Y typing (#2722)
9
+
10
+ ### 🌀 Miscellaneous
11
+
12
+ - Fix: Fix doc links (#2661)
13
+
14
+ ## [integrations/pgvector-v5.5.0] - 2026-01-02
15
+
16
+ ### 🚀 Features
17
+
18
+ - Adding `update_by_filter` and `delete_by_filter` to PgVector document store (#2647)
19
+
20
+
3
21
  ## [integrations/pgvector-v5.4.0] - 2025-12-05
4
22
 
5
23
  ### 📚 Documentation
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pgvector-haystack
3
- Version: 5.5.0
3
+ Version: 6.1.0
4
4
  Summary: An integration of pgvector (vector search extension for Postgres) 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/pgvector/README.md
@@ -11,15 +11,14 @@ License-File: LICENSE.txt
11
11
  Classifier: Development Status :: 4 - Beta
12
12
  Classifier: License :: OSI Approved :: Apache Software License
13
13
  Classifier: Programming Language :: Python
14
- Classifier: Programming Language :: Python :: 3.9
15
14
  Classifier: Programming Language :: Python :: 3.10
16
15
  Classifier: Programming Language :: Python :: 3.11
17
16
  Classifier: Programming Language :: Python :: 3.12
18
17
  Classifier: Programming Language :: Python :: 3.13
19
18
  Classifier: Programming Language :: Python :: Implementation :: CPython
20
19
  Classifier: Programming Language :: Python :: Implementation :: PyPy
21
- Requires-Python: >=3.9
22
- Requires-Dist: haystack-ai>=2.11.0
20
+ Requires-Python: >=3.10
21
+ Requires-Dist: haystack-ai>=2.22.0
23
22
  Requires-Dist: pgvector>=0.3.0
24
23
  Requires-Dist: psycopg[binary]
25
24
  Description-Content-Type: text/markdown
@@ -7,7 +7,7 @@ name = "pgvector-haystack"
7
7
  dynamic = ["version"]
8
8
  description = "An integration of pgvector (vector search extension for Postgres) with Haystack"
9
9
  readme = "README.md"
10
- requires-python = ">=3.9"
10
+ requires-python = ">=3.10"
11
11
  license = "Apache-2.0"
12
12
  keywords = []
13
13
  authors = [{ name = "deepset GmbH", email = "info@deepset.ai" }]
@@ -15,7 +15,6 @@ classifiers = [
15
15
  "License :: OSI Approved :: Apache Software License",
16
16
  "Development Status :: 4 - Beta",
17
17
  "Programming Language :: Python",
18
- "Programming Language :: Python :: 3.9",
19
18
  "Programming Language :: Python :: 3.10",
20
19
  "Programming Language :: Python :: 3.11",
21
20
  "Programming Language :: Python :: 3.12",
@@ -23,7 +22,7 @@ classifiers = [
23
22
  "Programming Language :: Python :: Implementation :: CPython",
24
23
  "Programming Language :: Python :: Implementation :: PyPy",
25
24
  ]
26
- dependencies = ["haystack-ai>=2.11.0", "pgvector>=0.3.0", "psycopg[binary]"]
25
+ dependencies = ["haystack-ai>=2.22.0", "pgvector>=0.3.0", "psycopg[binary]"]
27
26
 
28
27
  [project.urls]
29
28
  Source = "https://github.com/deepset-ai/haystack-core-integrations"
@@ -47,7 +46,7 @@ dependencies = ["haystack-pydoc-tools", "ruff"]
47
46
 
48
47
  [tool.hatch.envs.default.scripts]
49
48
  docs = ["pydoc-markdown pydoc/config_docusaurus.yml"]
50
- fmt = "ruff check --fix {args} && ruff format {args}"
49
+ fmt = "ruff check --fix {args}; ruff format {args}"
51
50
  fmt-check = "ruff check {args} && ruff format --check {args}"
52
51
 
53
52
  [tool.hatch.envs.test]
@@ -83,7 +82,6 @@ ignore_missing_imports = true
83
82
 
84
83
 
85
84
  [tool.ruff]
86
- target-version = "py39"
87
85
  line-length = 120
88
86
 
89
87
  [tool.ruff.lint]
@@ -134,10 +132,6 @@ ignore = [
134
132
  # ignore assertions
135
133
  "S101",
136
134
  ]
137
- unfixable = [
138
- # Don't touch unused imports
139
- "F401",
140
- ]
141
135
 
142
136
  [tool.ruff.lint.isort]
143
137
  known-first-party = ["haystack_integrations"]
@@ -1,7 +1,7 @@
1
1
  # SPDX-FileCopyrightText: 2023-present deepset GmbH <info@deepset.ai>
2
2
  #
3
3
  # SPDX-License-Identifier: Apache-2.0
4
- from typing import Any, Literal, Optional, Union
4
+ from typing import Any, Literal
5
5
 
6
6
  from haystack import component, default_from_dict, default_to_dict
7
7
  from haystack.dataclasses import Document
@@ -62,10 +62,10 @@ class PgvectorEmbeddingRetriever:
62
62
  self,
63
63
  *,
64
64
  document_store: PgvectorDocumentStore,
65
- filters: Optional[dict[str, Any]] = None,
65
+ filters: dict[str, Any] | None = None,
66
66
  top_k: int = 10,
67
- vector_function: Optional[Literal["cosine_similarity", "inner_product", "l2_distance"]] = None,
68
- filter_policy: Union[str, FilterPolicy] = FilterPolicy.REPLACE,
67
+ vector_function: Literal["cosine_similarity", "inner_product", "l2_distance"] | None = None,
68
+ filter_policy: str | FilterPolicy = FilterPolicy.REPLACE,
69
69
  ):
70
70
  """
71
71
  :param document_store: An instance of `PgvectorDocumentStore`.
@@ -137,9 +137,9 @@ class PgvectorEmbeddingRetriever:
137
137
  def run(
138
138
  self,
139
139
  query_embedding: list[float],
140
- filters: Optional[dict[str, Any]] = None,
141
- top_k: Optional[int] = None,
142
- vector_function: Optional[Literal["cosine_similarity", "inner_product", "l2_distance"]] = None,
140
+ filters: dict[str, Any] | None = None,
141
+ top_k: int | None = None,
142
+ vector_function: Literal["cosine_similarity", "inner_product", "l2_distance"] | None = None,
143
143
  ) -> dict[str, list[Document]]:
144
144
  """
145
145
  Retrieve documents from the `PgvectorDocumentStore`, based on their embeddings.
@@ -170,9 +170,9 @@ class PgvectorEmbeddingRetriever:
170
170
  async def run_async(
171
171
  self,
172
172
  query_embedding: list[float],
173
- filters: Optional[dict[str, Any]] = None,
174
- top_k: Optional[int] = None,
175
- vector_function: Optional[Literal["cosine_similarity", "inner_product", "l2_distance"]] = None,
173
+ filters: dict[str, Any] | None = None,
174
+ top_k: int | None = None,
175
+ vector_function: Literal["cosine_similarity", "inner_product", "l2_distance"] | None = None,
176
176
  ) -> dict[str, list[Document]]:
177
177
  """
178
178
  Asynchronously retrieve documents from the `PgvectorDocumentStore`, based on their embeddings.
@@ -1,7 +1,7 @@
1
1
  # SPDX-FileCopyrightText: 2023-present deepset GmbH <info@deepset.ai>
2
2
  #
3
3
  # SPDX-License-Identifier: Apache-2.0
4
- from typing import Any, Optional, Union
4
+ from typing import Any
5
5
 
6
6
  from haystack import component, default_from_dict, default_to_dict
7
7
  from haystack.dataclasses import Document
@@ -52,9 +52,9 @@ class PgvectorKeywordRetriever:
52
52
  self,
53
53
  *,
54
54
  document_store: PgvectorDocumentStore,
55
- filters: Optional[dict[str, Any]] = None,
55
+ filters: dict[str, Any] | None = None,
56
56
  top_k: int = 10,
57
- filter_policy: Union[str, FilterPolicy] = FilterPolicy.REPLACE,
57
+ filter_policy: str | FilterPolicy = FilterPolicy.REPLACE,
58
58
  ):
59
59
  """
60
60
  :param document_store: An instance of `PgvectorDocumentStore`.
@@ -111,8 +111,8 @@ class PgvectorKeywordRetriever:
111
111
  def run(
112
112
  self,
113
113
  query: str,
114
- filters: Optional[dict[str, Any]] = None,
115
- top_k: Optional[int] = None,
114
+ filters: dict[str, Any] | None = None,
115
+ top_k: int | None = None,
116
116
  ) -> dict[str, list[Document]]:
117
117
  """
118
118
  Retrieve documents from the `PgvectorDocumentStore`, based on keywords.
@@ -141,8 +141,8 @@ class PgvectorKeywordRetriever:
141
141
  async def run_async(
142
142
  self,
143
143
  query: str,
144
- filters: Optional[dict[str, Any]] = None,
145
- top_k: Optional[int] = None,
144
+ filters: dict[str, Any] | None = None,
145
+ top_k: int | None = None,
146
146
  ) -> dict[str, list[Document]]:
147
147
  """
148
148
  Asynchronously retrieve documents from the `PgvectorDocumentStore`, based on keywords.