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.
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/CHANGELOG.md +29 -0
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/PKG-INFO +3 -2
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/pyproject.toml +16 -3
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/components/retrievers/opensearch/bm25_retriever.py +1 -1
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/components/retrievers/opensearch/embedding_retriever.py +1 -1
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/components/retrievers/opensearch/metadata_retriever.py +1 -1
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/components/retrievers/opensearch/open_search_hybrid_retriever.py +12 -6
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/components/retrievers/opensearch/sql_retriever.py +1 -1
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/document_stores/opensearch/auth.py +1 -0
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/document_stores/opensearch/document_store.py +199 -50
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/document_stores/opensearch/filters.py +97 -7
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/tests/conftest.py +48 -0
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/tests/test_auth.py +2 -0
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/tests/test_bm25_retriever.py +1 -0
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/tests/test_document_store.py +598 -168
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/tests/test_document_store_async.py +105 -9
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/tests/test_embedding_retriever.py +1 -0
- opensearch_haystack-7.2.0/tests/test_filters.py +605 -0
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/tests/test_open_search_hybrid_retriever.py +1 -0
- opensearch_haystack-7.0.0/tests/test_filters.py +0 -247
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/.gitignore +0 -0
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/LICENSE +0 -0
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/README.md +0 -0
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/docker-compose.yml +0 -0
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/pydoc/config_docusaurus.yml +0 -0
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/components/retrievers/opensearch/__init__.py +0 -0
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/components/retrievers/py.typed +0 -0
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/document_stores/opensearch/__init__.py +0 -0
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/document_stores/opensearch/opensearch_scripts.py +0 -0
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/src/haystack_integrations/document_stores/py.typed +0 -0
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/tests/__init__.py +0 -0
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/tests/test_metadata_retriever.py +0 -0
- {opensearch_haystack-7.0.0 → opensearch_haystack-7.2.0}/tests/test_metadata_retriever_async.py +0 -0
- {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.
|
|
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.
|
|
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.
|
|
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
|
|
|
@@ -114,8 +114,9 @@ class OpenSearchHybridRetriever:
|
|
|
114
114
|
**kwargs: Any,
|
|
115
115
|
) -> None:
|
|
116
116
|
"""
|
|
117
|
-
Initialize the OpenSearchHybridRetriever
|
|
118
|
-
|
|
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
|