opensearch-haystack 7.0.0__tar.gz → 7.2.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 (34) hide show
  1. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/CHANGELOG.md +29 -0
  2. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/PKG-INFO +3 -2
  3. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/pyproject.toml +16 -3
  4. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/components/retrievers/opensearch/bm25_retriever.py +1 -1
  5. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/components/retrievers/opensearch/embedding_retriever.py +1 -1
  6. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/components/retrievers/opensearch/metadata_retriever.py +1 -1
  7. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/components/retrievers/opensearch/open_search_hybrid_retriever.py +12 -6
  8. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/components/retrievers/opensearch/sql_retriever.py +1 -1
  9. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/document_stores/opensearch/auth.py +1 -0
  10. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/document_stores/opensearch/document_store.py +199 -50
  11. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/document_stores/opensearch/filters.py +97 -7
  12. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/tests/conftest.py +48 -0
  13. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/tests/test_auth.py +2 -0
  14. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/tests/test_bm25_retriever.py +1 -0
  15. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/tests/test_document_store.py +598 -168
  16. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/tests/test_document_store_async.py +105 -9
  17. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/tests/test_embedding_retriever.py +1 -0
  18. opensearch_haystack-7.2.0/tests/test_filters.py +605 -0
  19. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/tests/test_open_search_hybrid_retriever.py +1 -0
  20. opensearch_haystack-7.0.0/tests/test_filters.py +0 -247
  21. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/.gitignore +0 -0
  22. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/LICENSE +0 -0
  23. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/README.md +0 -0
  24. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/docker-compose.yml +0 -0
  25. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/pydoc/config_docusaurus.yml +0 -0
  26. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/components/retrievers/opensearch/__init__.py +0 -0
  27. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/components/retrievers/py.typed +0 -0
  28. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/document_stores/opensearch/__init__.py +0 -0
  29. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/document_stores/opensearch/opensearch_scripts.py +0 -0
  30. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/document_stores/py.typed +0 -0
  31. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/tests/__init__.py +0 -0
  32. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/tests/test_metadata_retriever.py +0 -0
  33. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/tests/test_metadata_retriever_async.py +0 -0
  34. {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/tests/test_sql_retriever.py +0 -0
@@ -1,5 +1,34 @@
1
1
  # Changelog
2
2
 
3
+ ## [integrations/opensearch-v7.1.0] - 2026-04-01
4
+
5
+ ### 🚀 Features
6
+
7
+ - *(opensearch)* Handle errors due to clause overflow caused by fuzziness (#3068)
8
+
9
+ ### 🚜 Refactor
10
+
11
+ - Weaviate, chroma, elasticsearch, opensearch, azure_ai_search use `_normalize_metadata_field_name` from haystack.utils (#2953)
12
+
13
+ ### 🧪 Testing
14
+
15
+ - `OpensearchDocumentStore` use more Mixin tests (#3002)
16
+ - Test compatible integrations with python 3.14; update pyproject (#3001)
17
+ - Track test coverage for all integrations (#3065)
18
+
19
+ ### 🧹 Chores
20
+
21
+ - Add ANN ruff ruleset to llama_cpp, llama_stack, mcp, meta_llama, mistral, mongodb_atlas, nvidia, ollama, openrouter, opensearch (#2991)
22
+ - Enforce ruff docstring rules in integrations 31-40 (openrouter, opensearch, optimum, paddleocr, pgvector, pinecone, pyversity, qdrant, ragas, snowflake) (#3011)
23
+
24
+
25
+ ## [integrations/opensearch-v7.0.0] - 2026-03-19
26
+
27
+ ### 🐛 Bug Fixes
28
+
29
+ - OpenSearch - do not serialize string Secrets + authentication refactoring (#2967)
30
+
31
+
3
32
  ## [integrations/opensearch-v6.5.1] - 2026-03-10
4
33
 
5
34
  ### 🐛 Bug Fixes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: opensearch-haystack
3
- Version: 7.0.0
3
+ Version: 7.2.0
4
4
  Summary: Haystack 2.x Document Store for OpenSearch
5
5
  Project-URL: Documentation, https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/opensearch#readme
6
6
  Project-URL: Issues, https://github.com/deepset-ai/haystack-core-integrations/issues
@@ -15,10 +15,11 @@ Classifier: Programming Language :: Python :: 3.10
15
15
  Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
17
17
  Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
18
19
  Classifier: Programming Language :: Python :: Implementation :: CPython
19
20
  Classifier: Programming Language :: Python :: Implementation :: PyPy
20
21
  Requires-Python: >=3.10
21
- Requires-Dist: haystack-ai>=2.24.0
22
+ Requires-Dist: haystack-ai>=2.26.1
22
23
  Requires-Dist: opensearch-py[async]>=3.0.0
23
24
  Description-Content-Type: text/markdown
24
25
 
@@ -19,12 +19,13 @@ classifiers = [
19
19
  "Programming Language :: Python :: 3.11",
20
20
  "Programming Language :: Python :: 3.12",
21
21
  "Programming Language :: Python :: 3.13",
22
+ "Programming Language :: Python :: 3.14",
22
23
  "Programming Language :: Python :: Implementation :: CPython",
23
24
  "Programming Language :: Python :: Implementation :: PyPy",
24
25
  ]
25
26
 
26
27
  dependencies = [
27
- "haystack-ai>=2.24.0",
28
+ "haystack-ai>=2.26.1",
28
29
  "opensearch-py[async]>=3.0.0"
29
30
  ]
30
31
 
@@ -70,7 +71,8 @@ dependencies = [
70
71
  unit = 'pytest -m "not integration" {args:tests}'
71
72
  integration = 'pytest -m "integration" {args:tests}'
72
73
  all = 'pytest {args:tests}'
73
- cov-retry = 'pytest --cov=haystack_integrations --reruns 3 --reruns-delay 30 -x {args:tests}'
74
+ unit-cov-retry = 'pytest --cov=haystack_integrations --reruns 3 --reruns-delay 30 -x -m "not integration" {args:tests}'
75
+ integration-cov-append-retry = 'pytest --cov=haystack_integrations --cov-append --reruns 3 --reruns-delay 30 -x -m "integration" {args:tests}'
74
76
 
75
77
  types = """mypy -p haystack_integrations.document_stores.opensearch \
76
78
  -p haystack_integrations.components.retrievers.opensearch {args}"""
@@ -89,9 +91,17 @@ line-length = 120
89
91
  [tool.ruff.lint]
90
92
  select = [
91
93
  "A",
94
+ "ANN",
92
95
  "ARG",
93
96
  "B",
94
97
  "C",
98
+ "D102", # Missing docstring in public method
99
+ "D103", # Missing docstring in public function
100
+ "D205", # 1 blank line required between summary line and description
101
+ "D209", # Closing triple quotes go to new line
102
+ "D213", # summary lines must be positioned on the second physical line of the docstring
103
+ "D417", # Missing argument descriptions in the docstring
104
+ "D419", # Docstring is empty
95
105
  "DTZ",
96
106
  "E",
97
107
  "EM",
@@ -131,6 +141,8 @@ ignore = [
131
141
  "PLR0915",
132
142
  # Ignore asserts
133
143
  "S101",
144
+ # Allow `Any` - used legitimately for dynamic types and SDK boundaries
145
+ "ANN401",
134
146
  ]
135
147
 
136
148
  [tool.ruff.lint.isort]
@@ -141,11 +153,12 @@ ban-relative-imports = "parents"
141
153
 
142
154
  [tool.ruff.lint.per-file-ignores]
143
155
  # Tests can use magic values, assertions, and relative imports
144
- "tests/**/*" = ["PLR2004", "S101", "TID252"]
156
+ "tests/**/*" = ["D", "PLR2004", "S101", "TID252", "ANN"]
145
157
 
146
158
  [tool.coverage.run]
147
159
  source = ["haystack_integrations"]
148
160
  branch = true
161
+ relative_files = true
149
162
  parallel = false
150
163
 
151
164
 
@@ -36,7 +36,7 @@ class OpenSearchBM25Retriever:
36
36
  filter_policy: str | FilterPolicy = FilterPolicy.REPLACE,
37
37
  custom_query: dict[str, Any] | None = None,
38
38
  raise_on_failure: bool = True,
39
- ):
39
+ ) -> None:
40
40
  """
41
41
  Creates the OpenSearchBM25Retriever component.
42
42
 
@@ -35,7 +35,7 @@ class OpenSearchEmbeddingRetriever:
35
35
  raise_on_failure: bool = True,
36
36
  efficient_filtering: bool = False,
37
37
  search_kwargs: dict[str, Any] | None = None,
38
- ):
38
+ ) -> None:
39
39
  """
40
40
  Create the OpenSearchEmbeddingRetriever component.
41
41
 
@@ -92,7 +92,7 @@ class OpenSearchMetadataRetriever:
92
92
  tie_breaker: float = 0.7,
93
93
  jaccard_n: int = 3,
94
94
  raise_on_failure: bool = True,
95
- ):
95
+ ) -> None:
96
96
  """
97
97
  Create the OpenSearchMetadataRetriever component.
98
98
 
@@ -114,8 +114,9 @@ class OpenSearchHybridRetriever:
114
114
  **kwargs: Any,
115
115
  ) -> None:
116
116
  """
117
- Initialize the OpenSearchHybridRetriever, a super component to retrieve documents from OpenSearch using
118
- both embedding-based and keyword-based retrieval methods.
117
+ Initialize the OpenSearchHybridRetriever using both embedding-based and keyword-based retrieval methods.
118
+
119
+ This is a super component to retrieve documents from OpenSearch using both retrieval methods.
119
120
 
120
121
  We don't explicitly define all the init parameters of the components in the constructor, for each
121
122
  of the components, since that would be around 20+ parameters. Instead, we define the most important ones
@@ -242,7 +243,9 @@ class OpenSearchHybridRetriever:
242
243
 
243
244
  if TYPE_CHECKING:
244
245
 
245
- def warm_up(self) -> None: ...
246
+ def warm_up(self) -> None:
247
+ """Warm up the underlying pipeline components."""
248
+ ...
246
249
 
247
250
  def run(
248
251
  self,
@@ -251,7 +254,9 @@ class OpenSearchHybridRetriever:
251
254
  filters_embedding: dict[str, Any] | None = None,
252
255
  top_k_bm25: int | None = None,
253
256
  top_k_embedding: int | None = None,
254
- ) -> dict[str, list[Document]]: ...
257
+ ) -> dict[str, list[Document]]:
258
+ """Run the hybrid retrieval pipeline and return retrieved documents."""
259
+ ...
255
260
 
256
261
  def _create_pipeline(self, data: dict[str, Any]) -> Pipeline:
257
262
  """
@@ -284,7 +289,7 @@ class OpenSearchHybridRetriever:
284
289
 
285
290
  return hybrid_retrieval
286
291
 
287
- def to_dict(self):
292
+ def to_dict(self) -> dict[str, Any]:
288
293
  """
289
294
  Serialize OpenSearchHybridRetriever to a dictionary.
290
295
 
@@ -327,7 +332,8 @@ class OpenSearchHybridRetriever:
327
332
  )
328
333
 
329
334
  @classmethod
330
- def from_dict(cls, data):
335
+ def from_dict(cls, data: dict[str, Any]) -> "OpenSearchHybridRetriever":
336
+ """Deserialize an OpenSearchHybridRetriever from a dictionary."""
331
337
  # deserialize the document store
332
338
  doc_store = OpenSearchDocumentStore.from_dict(data["init_parameters"]["document_store"])
333
339
  data["init_parameters"]["document_store"] = doc_store
@@ -28,7 +28,7 @@ class OpenSearchSQLRetriever:
28
28
  document_store: OpenSearchDocumentStore,
29
29
  raise_on_failure: bool = True,
30
30
  fetch_size: int | None = None,
31
- ):
31
+ ) -> None:
32
32
  """
33
33
  Creates the OpenSearchSQLRetriever component.
34
34
 
@@ -41,6 +41,7 @@ def _get_aws_session(
41
41
  ) -> "boto3.Session":
42
42
  """
43
43
  Creates an AWS Session with the given parameters.
44
+
44
45
  Checks if the provided AWS credentials are valid and can be used to connect to AWS.
45
46
 
46
47
  :param aws_access_key_id: AWS access key ID.