hermes-client-python 1.8.142__tar.gz → 1.8.143__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.
- {hermes_client_python-1.8.142 → hermes_client_python-1.8.143}/PKG-INFO +3 -2
- {hermes_client_python-1.8.142 → hermes_client_python-1.8.143}/README.md +2 -1
- {hermes_client_python-1.8.142 → hermes_client_python-1.8.143}/pyproject.toml +1 -1
- {hermes_client_python-1.8.142 → hermes_client_python-1.8.143}/src/hermes_client_python/client.py +9 -5
- {hermes_client_python-1.8.142 → hermes_client_python-1.8.143}/.gitignore +0 -0
- {hermes_client_python-1.8.142 → hermes_client_python-1.8.143}/src/hermes_client_python/__init__.py +0 -0
- {hermes_client_python-1.8.142 → hermes_client_python-1.8.143}/src/hermes_client_python/hermes_pb2.py +0 -0
- {hermes_client_python-1.8.142 → hermes_client_python-1.8.143}/src/hermes_client_python/hermes_pb2_grpc.py +0 -0
- {hermes_client_python-1.8.142 → hermes_client_python-1.8.143}/src/hermes_client_python/types.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: hermes-client-python
|
|
3
|
-
Version: 1.8.
|
|
3
|
+
Version: 1.8.143
|
|
4
4
|
Summary: Async Python client for Hermes search server
|
|
5
5
|
Project-URL: Homepage, https://github.com/SpaceFrontiers/hermes
|
|
6
6
|
Project-URL: Repository, https://github.com/SpaceFrontiers/hermes
|
|
@@ -373,7 +373,8 @@ await client.commit("articles") # publishes accepted operations
|
|
|
373
373
|
same `DocumentMutationResult`. Single-document helpers raise on rejection. Missing
|
|
374
374
|
deletion keys are accepted. Commit before deleting/upserting a key with a pending
|
|
375
375
|
insertion or replacement. Limits are 100,000 deletion keys / 8 MiB key bytes and
|
|
376
|
-
1,000 replacement documents / 32 MiB encoded bytes
|
|
376
|
+
1,000 replacement documents / 32 MiB encoded bytes, or one replacement / 200 MiB
|
|
377
|
+
including the request envelope. Mutations use the usual timeout
|
|
377
378
|
argument; an expired RPC may have staged work, so do not blindly retry replacements.
|
|
378
379
|
Broker commits are atomic within each partition. Physical cleanup remains
|
|
379
380
|
`await client.force_merge("articles", compact=True)`.
|
|
@@ -349,7 +349,8 @@ await client.commit("articles") # publishes accepted operations
|
|
|
349
349
|
same `DocumentMutationResult`. Single-document helpers raise on rejection. Missing
|
|
350
350
|
deletion keys are accepted. Commit before deleting/upserting a key with a pending
|
|
351
351
|
insertion or replacement. Limits are 100,000 deletion keys / 8 MiB key bytes and
|
|
352
|
-
1,000 replacement documents / 32 MiB encoded bytes
|
|
352
|
+
1,000 replacement documents / 32 MiB encoded bytes, or one replacement / 200 MiB
|
|
353
|
+
including the request envelope. Mutations use the usual timeout
|
|
353
354
|
argument; an expired RPC may have staged work, so do not blindly retry replacements.
|
|
354
355
|
Broker commits are atomic within each partition. Physical cleanup remains
|
|
355
356
|
`await client.force_merge("articles", compact=True)`.
|
{hermes_client_python-1.8.142 → hermes_client_python-1.8.143}/src/hermes_client_python/client.py
RENAMED
|
@@ -96,7 +96,10 @@ class HermesClient:
|
|
|
96
96
|
# Increase message size limits for large responses (e.g., loading content fields)
|
|
97
97
|
options = [
|
|
98
98
|
("grpc.max_receive_message_length", 50 * 1024 * 1024), # 50MB
|
|
99
|
-
(
|
|
99
|
+
(
|
|
100
|
+
"grpc.max_send_message_length",
|
|
101
|
+
200 * 1024 * 1024,
|
|
102
|
+
), # singleton upsert ceiling
|
|
100
103
|
]
|
|
101
104
|
# Enable gzip compression for smaller message sizes over the wire
|
|
102
105
|
self._channel = aio.insecure_channel(
|
|
@@ -335,8 +338,8 @@ class HermesClient:
|
|
|
335
338
|
"""Stage complete replacements, inserting missing keys. No partial patches.
|
|
336
339
|
|
|
337
340
|
Each document must contain its primary key. Inspect per-item errors;
|
|
338
|
-
commit publishes
|
|
339
|
-
|
|
341
|
+
commit publishes the latest accepted replacement for each key,
|
|
342
|
+
including multiple replacements across calls.
|
|
340
343
|
"""
|
|
341
344
|
self._ensure_connected()
|
|
342
345
|
if len(documents) > 1_000:
|
|
@@ -347,8 +350,9 @@ class HermesClient:
|
|
|
347
350
|
pb.NamedDocument(fields=_to_field_entries(doc)) for doc in documents
|
|
348
351
|
],
|
|
349
352
|
)
|
|
350
|
-
if
|
|
351
|
-
|
|
353
|
+
limit_mib = 200 if len(documents) == 1 else 32
|
|
354
|
+
if request.ByteSize() > limit_mib * 1024 * 1024:
|
|
355
|
+
raise ValueError(f"upsert request exceeds {limit_mib} MiB encoded bytes")
|
|
352
356
|
response = await self._index_stub.UpsertDocuments(
|
|
353
357
|
request, timeout=self._deadline(timeout)
|
|
354
358
|
)
|
|
File without changes
|
{hermes_client_python-1.8.142 → hermes_client_python-1.8.143}/src/hermes_client_python/__init__.py
RENAMED
|
File without changes
|
{hermes_client_python-1.8.142 → hermes_client_python-1.8.143}/src/hermes_client_python/hermes_pb2.py
RENAMED
|
File without changes
|
|
File without changes
|
{hermes_client_python-1.8.142 → hermes_client_python-1.8.143}/src/hermes_client_python/types.py
RENAMED
|
File without changes
|