elasticsearch-haystack 1.0.0__tar.gz → 1.0.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.
Potentially problematic release.
This version of elasticsearch-haystack might be problematic. Click here for more details.
- {elasticsearch_haystack-1.0.0 → elasticsearch_haystack-1.0.1}/CHANGELOG.md +6 -1
- {elasticsearch_haystack-1.0.0 → elasticsearch_haystack-1.0.1}/PKG-INFO +1 -1
- {elasticsearch_haystack-1.0.0 → elasticsearch_haystack-1.0.1}/pyproject.toml +11 -7
- {elasticsearch_haystack-1.0.0 → elasticsearch_haystack-1.0.1}/src/haystack_integrations/document_stores/elasticsearch/document_store.py +4 -1
- {elasticsearch_haystack-1.0.0 → elasticsearch_haystack-1.0.1}/tests/test_document_store.py +14 -0
- {elasticsearch_haystack-1.0.0 → elasticsearch_haystack-1.0.1}/.gitignore +0 -0
- {elasticsearch_haystack-1.0.0 → elasticsearch_haystack-1.0.1}/LICENSE +0 -0
- {elasticsearch_haystack-1.0.0 → elasticsearch_haystack-1.0.1}/README.md +0 -0
- {elasticsearch_haystack-1.0.0 → elasticsearch_haystack-1.0.1}/docker-compose.yml +0 -0
- {elasticsearch_haystack-1.0.0 → elasticsearch_haystack-1.0.1}/pydoc/config.yml +0 -0
- {elasticsearch_haystack-1.0.0 → elasticsearch_haystack-1.0.1}/src/haystack_integrations/components/retrievers/elasticsearch/__init__.py +0 -0
- {elasticsearch_haystack-1.0.0 → elasticsearch_haystack-1.0.1}/src/haystack_integrations/components/retrievers/elasticsearch/bm25_retriever.py +0 -0
- {elasticsearch_haystack-1.0.0 → elasticsearch_haystack-1.0.1}/src/haystack_integrations/components/retrievers/elasticsearch/embedding_retriever.py +0 -0
- {elasticsearch_haystack-1.0.0 → elasticsearch_haystack-1.0.1}/src/haystack_integrations/document_stores/elasticsearch/__init__.py +0 -0
- {elasticsearch_haystack-1.0.0 → elasticsearch_haystack-1.0.1}/src/haystack_integrations/document_stores/elasticsearch/filters.py +0 -0
- {elasticsearch_haystack-1.0.0 → elasticsearch_haystack-1.0.1}/tests/__init__.py +0 -0
- {elasticsearch_haystack-1.0.0 → elasticsearch_haystack-1.0.1}/tests/test_bm25_retriever.py +0 -0
- {elasticsearch_haystack-1.0.0 → elasticsearch_haystack-1.0.1}/tests/test_embedding_retriever.py +0 -0
- {elasticsearch_haystack-1.0.0 → elasticsearch_haystack-1.0.1}/tests/test_filters.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [
|
|
3
|
+
## [integrations/elasticsearch-v1.0.0] - 2024-09-12
|
|
4
4
|
|
|
5
5
|
### 🚀 Features
|
|
6
6
|
|
|
@@ -11,10 +11,15 @@
|
|
|
11
11
|
|
|
12
12
|
- `ElasticSearch` - Fallback to default filter policy when deserializing retrievers without the init parameter (#898)
|
|
13
13
|
|
|
14
|
+
### 🧪 Testing
|
|
15
|
+
|
|
16
|
+
- Do not retry tests in `hatch run test` command (#954)
|
|
17
|
+
|
|
14
18
|
### ⚙️ Miscellaneous Tasks
|
|
15
19
|
|
|
16
20
|
- Retry tests to reduce flakyness (#836)
|
|
17
21
|
- Update ruff invocation to include check parameter (#853)
|
|
22
|
+
- ElasticSearch - remove legacy filters elasticsearch (#1078)
|
|
18
23
|
|
|
19
24
|
## [integrations/elasticsearch-v0.5.0] - 2024-05-24
|
|
20
25
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: elasticsearch-haystack
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.1
|
|
4
4
|
Summary: Haystack 2.x Document Store for ElasticSearch
|
|
5
5
|
Project-URL: Documentation, https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/elasticsearch#readme
|
|
6
6
|
Project-URL: Issues, https://github.com/deepset-ai/haystack-core-integrations/issues
|
|
@@ -41,6 +41,7 @@ root = "../.."
|
|
|
41
41
|
git_describe_command = 'git describe --tags --match="integrations/elasticsearch-v[0-9]*"'
|
|
42
42
|
|
|
43
43
|
[tool.hatch.envs.default]
|
|
44
|
+
installer = "uv"
|
|
44
45
|
dependencies = [
|
|
45
46
|
"coverage[toml]>=6.5",
|
|
46
47
|
"pytest",
|
|
@@ -61,12 +62,13 @@ docs = ["pydoc-markdown pydoc/config.yml"]
|
|
|
61
62
|
python = ["3.8", "3.9", "3.10", "3.11"]
|
|
62
63
|
|
|
63
64
|
[tool.hatch.envs.lint]
|
|
65
|
+
installer = "uv"
|
|
64
66
|
detached = true
|
|
65
|
-
dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
|
|
67
|
+
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
|
|
66
68
|
[tool.hatch.envs.lint.scripts]
|
|
67
69
|
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
|
|
68
|
-
style = ["ruff check {args
|
|
69
|
-
fmt = ["black {args:.}", "ruff --fix {args
|
|
70
|
+
style = ["ruff check {args:}", "black --check --diff {args:.}"]
|
|
71
|
+
fmt = ["black {args:.}", "ruff check --fix {args:}", "style"]
|
|
70
72
|
all = ["style", "typing"]
|
|
71
73
|
|
|
72
74
|
[tool.hatch.metadata]
|
|
@@ -80,6 +82,8 @@ skip-string-normalization = true
|
|
|
80
82
|
[tool.ruff]
|
|
81
83
|
target-version = "py38"
|
|
82
84
|
line-length = 120
|
|
85
|
+
|
|
86
|
+
[tool.ruff.lint]
|
|
83
87
|
select = [
|
|
84
88
|
"A",
|
|
85
89
|
"ARG",
|
|
@@ -128,13 +132,13 @@ unfixable = [
|
|
|
128
132
|
"F401",
|
|
129
133
|
]
|
|
130
134
|
|
|
131
|
-
[tool.ruff.isort]
|
|
132
|
-
known-first-party = ["
|
|
135
|
+
[tool.ruff.lint.isort]
|
|
136
|
+
known-first-party = ["haystack_integrations"]
|
|
133
137
|
|
|
134
|
-
[tool.ruff.flake8-tidy-imports]
|
|
138
|
+
[tool.ruff.lint.flake8-tidy-imports]
|
|
135
139
|
ban-relative-imports = "parents"
|
|
136
140
|
|
|
137
|
-
[tool.ruff.per-file-ignores]
|
|
141
|
+
[tool.ruff.lint.per-file-ignores]
|
|
138
142
|
# Tests can use magic values, assertions, and relative imports
|
|
139
143
|
"tests/**/*" = ["PLR2004", "S101", "TID252"]
|
|
140
144
|
|
|
@@ -105,9 +105,12 @@ class ElasticsearchDocumentStore:
|
|
|
105
105
|
@property
|
|
106
106
|
def client(self) -> Elasticsearch:
|
|
107
107
|
if self._client is None:
|
|
108
|
+
headers = self._kwargs.pop("headers", {})
|
|
109
|
+
headers["user-agent"] = f"haystack-py-ds/{haystack_version}"
|
|
110
|
+
|
|
108
111
|
client = Elasticsearch(
|
|
109
112
|
self._hosts,
|
|
110
|
-
headers=
|
|
113
|
+
headers=headers,
|
|
111
114
|
**self._kwargs,
|
|
112
115
|
)
|
|
113
116
|
# Check client connection, this will raise if not connected
|
|
@@ -22,6 +22,20 @@ def test_init_is_lazy(_mock_es_client):
|
|
|
22
22
|
_mock_es_client.assert_not_called()
|
|
23
23
|
|
|
24
24
|
|
|
25
|
+
@patch("haystack_integrations.document_stores.elasticsearch.document_store.Elasticsearch")
|
|
26
|
+
def test_headers_are_supported(_mock_es_client):
|
|
27
|
+
_ = ElasticsearchDocumentStore(hosts="testhost", headers={"header1": "value1", "header2": "value2"}).client
|
|
28
|
+
|
|
29
|
+
assert _mock_es_client.call_count == 1
|
|
30
|
+
_, kwargs = _mock_es_client.call_args
|
|
31
|
+
|
|
32
|
+
headers_found = kwargs["headers"]
|
|
33
|
+
assert headers_found["header1"] == "value1"
|
|
34
|
+
assert headers_found["header2"] == "value2"
|
|
35
|
+
|
|
36
|
+
assert headers_found["user-agent"].startswith("haystack-py-ds/")
|
|
37
|
+
|
|
38
|
+
|
|
25
39
|
@patch("haystack_integrations.document_stores.elasticsearch.document_store.Elasticsearch")
|
|
26
40
|
def test_to_dict(_mock_elasticsearch_client):
|
|
27
41
|
document_store = ElasticsearchDocumentStore(hosts="some hosts")
|
|
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
|
{elasticsearch_haystack-1.0.0 → elasticsearch_haystack-1.0.1}/tests/test_embedding_retriever.py
RENAMED
|
File without changes
|
|
File without changes
|