elasticsearch-haystack 0.7.1__py3-none-any.whl → 1.0.1__py3-none-any.whl
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-0.7.1.dist-info → elasticsearch_haystack-1.0.1.dist-info}/METADATA +1 -1
- {elasticsearch_haystack-0.7.1.dist-info → elasticsearch_haystack-1.0.1.dist-info}/RECORD +7 -7
- haystack_integrations/components/retrievers/elasticsearch/bm25_retriever.py +1 -0
- haystack_integrations/components/retrievers/elasticsearch/embedding_retriever.py +1 -0
- haystack_integrations/document_stores/elasticsearch/document_store.py +6 -3
- {elasticsearch_haystack-0.7.1.dist-info → elasticsearch_haystack-1.0.1.dist-info}/WHEEL +0 -0
- {elasticsearch_haystack-0.7.1.dist-info → elasticsearch_haystack-1.0.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: elasticsearch-haystack
|
|
3
|
-
Version: 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
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
haystack_integrations/components/retrievers/elasticsearch/__init__.py,sha256=cSJBsYjz_T4kK-M-auAHVUnYIcgUqqwwQe_hsF0_IG4,307
|
|
2
|
-
haystack_integrations/components/retrievers/elasticsearch/bm25_retriever.py,sha256=
|
|
3
|
-
haystack_integrations/components/retrievers/elasticsearch/embedding_retriever.py,sha256=
|
|
2
|
+
haystack_integrations/components/retrievers/elasticsearch/bm25_retriever.py,sha256=XA6UiNFb59CMM5LSoPmNDe3IzZ7ty7HViSaU2ZT4--w,5851
|
|
3
|
+
haystack_integrations/components/retrievers/elasticsearch/embedding_retriever.py,sha256=ZL9kHi6tCzks1_GXoOIRVLcN4BWnaMqN6t-JcwdTfao,5992
|
|
4
4
|
haystack_integrations/document_stores/elasticsearch/__init__.py,sha256=YTfu94dtVUBogbJFr1aJrKuaI6-Bw9VuHfPoyU7M8os,207
|
|
5
|
-
haystack_integrations/document_stores/elasticsearch/document_store.py,sha256=
|
|
5
|
+
haystack_integrations/document_stores/elasticsearch/document_store.py,sha256=B2B0F2AHsoP1-BykF_xqfRAYeQPmsiBn0QCIfTqk-pc,18871
|
|
6
6
|
haystack_integrations/document_stores/elasticsearch/filters.py,sha256=L1tN7YCIDuNdhGrBQdPoqXFk37x__2-K038xZ6PRdNQ,9923
|
|
7
|
-
elasticsearch_haystack-0.
|
|
8
|
-
elasticsearch_haystack-0.
|
|
9
|
-
elasticsearch_haystack-0.
|
|
10
|
-
elasticsearch_haystack-0.
|
|
7
|
+
elasticsearch_haystack-1.0.1.dist-info/METADATA,sha256=hTImF5-zddncU9m31MLAS4eDtlShxI_gb5lgQFMlCbI,2168
|
|
8
|
+
elasticsearch_haystack-1.0.1.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
9
|
+
elasticsearch_haystack-1.0.1.dist-info/licenses/LICENSE,sha256=_M2kulivnaiTHiW-5CRlZrPmH47tt04pBgAgeDvfYi4,11342
|
|
10
|
+
elasticsearch_haystack-1.0.1.dist-info/RECORD,,
|
|
@@ -7,6 +7,7 @@ from haystack import component, default_from_dict, default_to_dict
|
|
|
7
7
|
from haystack.dataclasses import Document
|
|
8
8
|
from haystack.document_stores.types import FilterPolicy
|
|
9
9
|
from haystack.document_stores.types.filter_policy import apply_filter_policy
|
|
10
|
+
|
|
10
11
|
from haystack_integrations.document_stores.elasticsearch.document_store import ElasticsearchDocumentStore
|
|
11
12
|
|
|
12
13
|
|
|
@@ -7,6 +7,7 @@ from haystack import component, default_from_dict, default_to_dict
|
|
|
7
7
|
from haystack.dataclasses import Document
|
|
8
8
|
from haystack.document_stores.types import FilterPolicy
|
|
9
9
|
from haystack.document_stores.types.filter_policy import apply_filter_policy
|
|
10
|
+
|
|
10
11
|
from haystack_integrations.document_stores.elasticsearch.document_store import ElasticsearchDocumentStore
|
|
11
12
|
|
|
12
13
|
|
|
@@ -12,7 +12,6 @@ from haystack import default_from_dict, default_to_dict
|
|
|
12
12
|
from haystack.dataclasses import Document
|
|
13
13
|
from haystack.document_stores.errors import DocumentStoreError, DuplicateDocumentError
|
|
14
14
|
from haystack.document_stores.types import DuplicatePolicy
|
|
15
|
-
from haystack.utils.filters import convert
|
|
16
15
|
from haystack.version import __version__ as haystack_version
|
|
17
16
|
|
|
18
17
|
from elasticsearch import Elasticsearch, helpers # type: ignore[import-not-found]
|
|
@@ -106,9 +105,12 @@ class ElasticsearchDocumentStore:
|
|
|
106
105
|
@property
|
|
107
106
|
def client(self) -> Elasticsearch:
|
|
108
107
|
if self._client is None:
|
|
108
|
+
headers = self._kwargs.pop("headers", {})
|
|
109
|
+
headers["user-agent"] = f"haystack-py-ds/{haystack_version}"
|
|
110
|
+
|
|
109
111
|
client = Elasticsearch(
|
|
110
112
|
self._hosts,
|
|
111
|
-
headers=
|
|
113
|
+
headers=headers,
|
|
112
114
|
**self._kwargs,
|
|
113
115
|
)
|
|
114
116
|
# Check client connection, this will raise if not connected
|
|
@@ -224,7 +226,8 @@ class ElasticsearchDocumentStore:
|
|
|
224
226
|
:returns: List of `Document`s that match the filters.
|
|
225
227
|
"""
|
|
226
228
|
if filters and "operator" not in filters and "conditions" not in filters:
|
|
227
|
-
|
|
229
|
+
msg = "Invalid filter syntax. See https://docs.haystack.deepset.ai/docs/metadata-filtering for details."
|
|
230
|
+
raise ValueError(msg)
|
|
228
231
|
|
|
229
232
|
query = {"bool": {"filter": _normalize_filters(filters)}} if filters else None
|
|
230
233
|
documents = self._search_documents(query=query)
|
|
File without changes
|
{elasticsearch_haystack-0.7.1.dist-info → elasticsearch_haystack-1.0.1.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|