opensearch-haystack 7.2.0__tar.gz → 7.2.1__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.2.0 → opensearch_haystack-7.2.1}/CHANGELOG.md +15 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/PKG-INFO +1 -1
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/src/haystack_integrations/document_stores/opensearch/document_store.py +12 -4
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/tests/test_sql_retriever.py +45 -1
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/.gitignore +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/LICENSE +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/README.md +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/docker-compose.yml +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/pydoc/config_docusaurus.yml +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/pyproject.toml +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/src/haystack_integrations/components/retrievers/opensearch/__init__.py +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/src/haystack_integrations/components/retrievers/opensearch/bm25_retriever.py +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/src/haystack_integrations/components/retrievers/opensearch/embedding_retriever.py +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/src/haystack_integrations/components/retrievers/opensearch/metadata_retriever.py +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/src/haystack_integrations/components/retrievers/opensearch/open_search_hybrid_retriever.py +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/src/haystack_integrations/components/retrievers/opensearch/sql_retriever.py +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/src/haystack_integrations/components/retrievers/py.typed +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/src/haystack_integrations/document_stores/opensearch/__init__.py +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/src/haystack_integrations/document_stores/opensearch/auth.py +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/src/haystack_integrations/document_stores/opensearch/filters.py +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/src/haystack_integrations/document_stores/opensearch/opensearch_scripts.py +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/src/haystack_integrations/document_stores/py.typed +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/tests/__init__.py +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/tests/conftest.py +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/tests/test_auth.py +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/tests/test_bm25_retriever.py +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/tests/test_document_store.py +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/tests/test_document_store_async.py +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/tests/test_embedding_retriever.py +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/tests/test_filters.py +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/tests/test_metadata_retriever.py +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/tests/test_metadata_retriever_async.py +0 -0
- {opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/tests/test_open_search_hybrid_retriever.py +0 -0
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [integrations/opensearch-v7.2.0] - 2026-04-10
|
|
4
|
+
|
|
5
|
+
### 🚀 Features
|
|
6
|
+
|
|
7
|
+
- *(opensearch)* Add support for nested fields in OpenSearchDocumentStore (#3117)
|
|
8
|
+
|
|
9
|
+
### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- Replace in-place dataclass mutations in document stores (#3114)
|
|
12
|
+
|
|
13
|
+
### 🧪 Testing
|
|
14
|
+
|
|
15
|
+
- Better categorize some Document Stores tests (#3085)
|
|
16
|
+
|
|
17
|
+
|
|
3
18
|
## [integrations/opensearch-v7.1.0] - 2026-04-01
|
|
4
19
|
|
|
5
20
|
### 🚀 Features
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: opensearch-haystack
|
|
3
|
-
Version: 7.2.
|
|
3
|
+
Version: 7.2.1
|
|
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
|
|
@@ -2160,9 +2160,13 @@ class OpenSearchDocumentStore:
|
|
|
2160
2160
|
if fetch_size is not None:
|
|
2161
2161
|
body["fetch_size"] = fetch_size
|
|
2162
2162
|
|
|
2163
|
+
# NOTE: method and url must be passed as positional args (not keyword args).
|
|
2164
|
+
# ddtrace's Elasticsearch instrumentation patch wraps perform_request and unpacks
|
|
2165
|
+
# the first two positional args as `method, target = args`. Passing them as
|
|
2166
|
+
# keyword args results in an empty `args` tuple and raises a ValueError.
|
|
2163
2167
|
response_data = self._client.transport.perform_request(
|
|
2164
|
-
|
|
2165
|
-
|
|
2168
|
+
"POST",
|
|
2169
|
+
"/_plugins/_sql",
|
|
2166
2170
|
body=body,
|
|
2167
2171
|
)
|
|
2168
2172
|
|
|
@@ -2193,9 +2197,13 @@ class OpenSearchDocumentStore:
|
|
|
2193
2197
|
if fetch_size is not None:
|
|
2194
2198
|
body["fetch_size"] = fetch_size
|
|
2195
2199
|
|
|
2200
|
+
# NOTE: method and url must be passed as positional args (not keyword args).
|
|
2201
|
+
# ddtrace's Elasticsearch instrumentation patch wraps perform_request and unpacks
|
|
2202
|
+
# the first two positional args as `method, target = args`. Passing them as
|
|
2203
|
+
# keyword args results in an empty `args` tuple and raises a ValueError.
|
|
2196
2204
|
response_data = await self._async_client.transport.perform_request(
|
|
2197
|
-
|
|
2198
|
-
|
|
2205
|
+
"POST",
|
|
2206
|
+
"/_plugins/_sql",
|
|
2199
2207
|
body=body,
|
|
2200
2208
|
)
|
|
2201
2209
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
#
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
|
|
5
|
-
from unittest.mock import Mock, patch
|
|
5
|
+
from unittest.mock import AsyncMock, MagicMock, Mock, patch
|
|
6
6
|
|
|
7
7
|
import pytest
|
|
8
8
|
from haystack.dataclasses import Document
|
|
@@ -50,6 +50,50 @@ def test_from_dict(_mock_opensearch_client):
|
|
|
50
50
|
assert retriever_from_dict._raise_on_failure is True
|
|
51
51
|
|
|
52
52
|
|
|
53
|
+
@patch("haystack_integrations.document_stores.opensearch.document_store.OpenSearch")
|
|
54
|
+
def test_query_sql_uses_positional_args(_mock_opensearch_class):
|
|
55
|
+
"""Verify perform_request is called with positional method/url args (ddtrace compatibility)."""
|
|
56
|
+
mock_transport = MagicMock()
|
|
57
|
+
mock_transport.perform_request.return_value = {"schema": [], "datarows": []}
|
|
58
|
+
mock_client = MagicMock()
|
|
59
|
+
mock_client.transport = mock_transport
|
|
60
|
+
_mock_opensearch_class.return_value = mock_client
|
|
61
|
+
|
|
62
|
+
document_store = OpenSearchDocumentStore(hosts="some fake host")
|
|
63
|
+
document_store._client = mock_client
|
|
64
|
+
|
|
65
|
+
document_store._query_sql(query="SELECT 1", fetch_size=10)
|
|
66
|
+
|
|
67
|
+
mock_transport.perform_request.assert_called_once()
|
|
68
|
+
call_args, call_kwargs = mock_transport.perform_request.call_args
|
|
69
|
+
assert call_args[0] == "POST"
|
|
70
|
+
assert call_args[1] == "/_plugins/_sql"
|
|
71
|
+
assert call_kwargs.get("body") == {"query": "SELECT 1", "fetch_size": 10}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
@patch("haystack_integrations.document_stores.opensearch.document_store.AsyncOpenSearch")
|
|
75
|
+
@patch("haystack_integrations.document_stores.opensearch.document_store.OpenSearch")
|
|
76
|
+
@pytest.mark.asyncio
|
|
77
|
+
async def test_query_sql_async_uses_positional_args(_mock_opensearch_class, _mock_async_opensearch_class):
|
|
78
|
+
"""Verify async perform_request is called with positional method/url args (ddtrace compatibility)."""
|
|
79
|
+
mock_transport = MagicMock()
|
|
80
|
+
mock_transport.perform_request = AsyncMock(return_value={"schema": [], "datarows": []})
|
|
81
|
+
mock_async_client = MagicMock()
|
|
82
|
+
mock_async_client.transport = mock_transport
|
|
83
|
+
_mock_async_opensearch_class.return_value = mock_async_client
|
|
84
|
+
|
|
85
|
+
document_store = OpenSearchDocumentStore(hosts="some fake host")
|
|
86
|
+
document_store._async_client = mock_async_client
|
|
87
|
+
|
|
88
|
+
await document_store._query_sql_async(query="SELECT 1", fetch_size=10)
|
|
89
|
+
|
|
90
|
+
mock_transport.perform_request.assert_called_once()
|
|
91
|
+
call_args, call_kwargs = mock_transport.perform_request.call_args
|
|
92
|
+
assert call_args[0] == "POST"
|
|
93
|
+
assert call_args[1] == "/_plugins/_sql"
|
|
94
|
+
assert call_kwargs.get("body") == {"query": "SELECT 1", "fetch_size": 10}
|
|
95
|
+
|
|
96
|
+
|
|
53
97
|
@pytest.mark.integration
|
|
54
98
|
def test_sql_retriever_basic_query_hits_format(document_store: OpenSearchDocumentStore):
|
|
55
99
|
"""Test regular SELECT query - verifies raw response"""
|
|
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
|
|
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
|
{opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/tests/test_metadata_retriever_async.py
RENAMED
|
File without changes
|
{opensearch_haystack-7.2.0 → opensearch_haystack-7.2.1}/tests/test_open_search_hybrid_retriever.py
RENAMED
|
File without changes
|