hermes-client-python 1.4.4__tar.gz → 1.4.5__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.4.4 → hermes_client_python-1.4.5}/PKG-INFO +1 -1
- {hermes_client_python-1.4.4 → hermes_client_python-1.4.5}/pyproject.toml +1 -1
- {hermes_client_python-1.4.4 → hermes_client_python-1.4.5}/src/hermes_client_python/client.py +51 -1
- hermes_client_python-1.4.5/src/hermes_client_python/hermes_pb2.py +114 -0
- hermes_client_python-1.4.4/src/hermes_client/hermes_pb2.py +0 -110
- hermes_client_python-1.4.4/src/hermes_client_python/hermes_pb2.py +0 -106
- hermes_client_python-1.4.4/src/hermes_client_python/hermes_pb2_grpc.py +0 -511
- {hermes_client_python-1.4.4 → hermes_client_python-1.4.5}/.gitignore +0 -0
- {hermes_client_python-1.4.4 → hermes_client_python-1.4.5}/README.md +0 -0
- {hermes_client_python-1.4.4 → hermes_client_python-1.4.5}/src/hermes_client_python/__init__.py +0 -0
- {hermes_client_python-1.4.4/src/hermes_client → hermes_client_python-1.4.5/src/hermes_client_python}/hermes_pb2_grpc.py +0 -0
- {hermes_client_python-1.4.4 → hermes_client_python-1.4.5}/src/hermes_client_python/types.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hermes-client-python
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.5
|
|
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
|
{hermes_client_python-1.4.4 → hermes_client_python-1.4.5}/src/hermes_client_python/client.py
RENAMED
|
@@ -242,6 +242,10 @@ class HermesClient:
|
|
|
242
242
|
*,
|
|
243
243
|
term: tuple[str, str] | None = None,
|
|
244
244
|
boolean: dict[str, list[tuple[str, str]]] | None = None,
|
|
245
|
+
sparse_vector: tuple[str, list[int], list[float]] | None = None,
|
|
246
|
+
dense_vector: tuple[str, list[float]] | None = None,
|
|
247
|
+
nprobe: int = 0,
|
|
248
|
+
rerank_factor: int = 0,
|
|
245
249
|
limit: int = 10,
|
|
246
250
|
offset: int = 0,
|
|
247
251
|
fields_to_load: list[str] | None = None,
|
|
@@ -252,6 +256,10 @@ class HermesClient:
|
|
|
252
256
|
index_name: Name of the index
|
|
253
257
|
term: Term query as (field, term) tuple
|
|
254
258
|
boolean: Boolean query with "must", "should", "must_not" keys
|
|
259
|
+
sparse_vector: Sparse vector query as (field, indices, values) tuple
|
|
260
|
+
dense_vector: Dense vector query as (field, vector) tuple
|
|
261
|
+
nprobe: Number of clusters to probe for dense vector (IVF indexes)
|
|
262
|
+
rerank_factor: Re-ranking factor for dense vector search
|
|
255
263
|
limit: Maximum number of results
|
|
256
264
|
offset: Offset for pagination
|
|
257
265
|
fields_to_load: List of fields to include in results
|
|
@@ -268,10 +276,29 @@ class HermesClient:
|
|
|
268
276
|
"must": [("title", "hello")],
|
|
269
277
|
"should": [("body", "world")],
|
|
270
278
|
})
|
|
279
|
+
|
|
280
|
+
# Sparse vector query
|
|
281
|
+
results = await client.search("docs",
|
|
282
|
+
sparse_vector=("embedding", [1, 5, 10], [0.5, 0.3, 0.2]),
|
|
283
|
+
fields_to_load=["title", "body"]
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
# Dense vector query
|
|
287
|
+
results = await client.search("docs",
|
|
288
|
+
dense_vector=("embedding", [0.1, 0.2, 0.3, ...]),
|
|
289
|
+
fields_to_load=["title"]
|
|
290
|
+
)
|
|
271
291
|
"""
|
|
272
292
|
self._ensure_connected()
|
|
273
293
|
|
|
274
|
-
query = _build_query(
|
|
294
|
+
query = _build_query(
|
|
295
|
+
term=term,
|
|
296
|
+
boolean=boolean,
|
|
297
|
+
sparse_vector=sparse_vector,
|
|
298
|
+
dense_vector=dense_vector,
|
|
299
|
+
nprobe=nprobe,
|
|
300
|
+
rerank_factor=rerank_factor,
|
|
301
|
+
)
|
|
275
302
|
|
|
276
303
|
request = pb.SearchRequest(
|
|
277
304
|
index_name=index_name,
|
|
@@ -376,6 +403,10 @@ def _build_query(
|
|
|
376
403
|
*,
|
|
377
404
|
term: tuple[str, str] | None = None,
|
|
378
405
|
boolean: dict[str, list[tuple[str, str]]] | None = None,
|
|
406
|
+
sparse_vector: tuple[str, list[int], list[float]] | None = None,
|
|
407
|
+
dense_vector: tuple[str, list[float]] | None = None,
|
|
408
|
+
nprobe: int = 0,
|
|
409
|
+
rerank_factor: int = 0,
|
|
379
410
|
) -> pb.Query:
|
|
380
411
|
"""Build a protobuf Query from parameters."""
|
|
381
412
|
if term is not None:
|
|
@@ -399,5 +430,24 @@ def _build_query(
|
|
|
399
430
|
boolean=pb.BooleanQuery(must=must, should=should, must_not=must_not)
|
|
400
431
|
)
|
|
401
432
|
|
|
433
|
+
if sparse_vector is not None:
|
|
434
|
+
field, indices, values = sparse_vector
|
|
435
|
+
return pb.Query(
|
|
436
|
+
sparse_vector=pb.SparseVectorQuery(
|
|
437
|
+
field=field, indices=indices, values=values
|
|
438
|
+
)
|
|
439
|
+
)
|
|
440
|
+
|
|
441
|
+
if dense_vector is not None:
|
|
442
|
+
field, vector = dense_vector
|
|
443
|
+
return pb.Query(
|
|
444
|
+
dense_vector=pb.DenseVectorQuery(
|
|
445
|
+
field=field,
|
|
446
|
+
vector=vector,
|
|
447
|
+
nprobe=nprobe,
|
|
448
|
+
rerank_factor=rerank_factor,
|
|
449
|
+
)
|
|
450
|
+
)
|
|
451
|
+
|
|
402
452
|
# Default: match all (empty boolean query)
|
|
403
453
|
return pb.Query(boolean=pb.BooleanQuery())
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: hermes.proto
|
|
5
|
+
# Protobuf Python Version: 6.31.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
6,
|
|
15
|
+
31,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'hermes.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0chermes.proto\x12\x06hermes\"\x88\x02\n\x05Query\x12!\n\x04term\x18\x01 \x01(\x0b\x32\x11.hermes.TermQueryH\x00\x12\'\n\x07\x62oolean\x18\x02 \x01(\x0b\x32\x14.hermes.BooleanQueryH\x00\x12#\n\x05\x62oost\x18\x03 \x01(\x0b\x32\x12.hermes.BoostQueryH\x00\x12\x1f\n\x03\x61ll\x18\x04 \x01(\x0b\x32\x10.hermes.AllQueryH\x00\x12\x32\n\rsparse_vector\x18\x05 \x01(\x0b\x32\x19.hermes.SparseVectorQueryH\x00\x12\x30\n\x0c\x64\x65nse_vector\x18\x06 \x01(\x0b\x32\x18.hermes.DenseVectorQueryH\x00\x42\x07\n\x05query\"C\n\x11SparseVectorQuery\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0f\n\x07indices\x18\x02 \x03(\r\x12\x0e\n\x06values\x18\x03 \x03(\x02\"X\n\x10\x44\x65nseVectorQuery\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0e\n\x06vector\x18\x02 \x03(\x02\x12\x0e\n\x06nprobe\x18\x03 \x01(\r\x12\x15\n\rrerank_factor\x18\x04 \x01(\r\"(\n\tTermQuery\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04term\x18\x02 \x01(\t\"k\n\x0c\x42ooleanQuery\x12\x1b\n\x04must\x18\x01 \x03(\x0b\x32\r.hermes.Query\x12\x1d\n\x06should\x18\x02 \x03(\x0b\x32\r.hermes.Query\x12\x1f\n\x08must_not\x18\x03 \x03(\x0b\x32\r.hermes.Query\"9\n\nBoostQuery\x12\x1c\n\x05query\x18\x01 \x01(\x0b\x32\r.hermes.Query\x12\r\n\x05\x62oost\x18\x02 \x01(\x02\"\n\n\x08\x41llQuery\"x\n\rSearchRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x1c\n\x05query\x18\x02 \x01(\x0b\x32\r.hermes.Query\x12\r\n\x05limit\x18\x03 \x01(\r\x12\x0e\n\x06offset\x18\x04 \x01(\r\x12\x16\n\x0e\x66ields_to_load\x18\x05 \x03(\t\"\x9c\x01\n\tSearchHit\x12\x0e\n\x06\x64oc_id\x18\x01 \x01(\r\x12\r\n\x05score\x18\x02 \x01(\x02\x12-\n\x06\x66ields\x18\x03 \x03(\x0b\x32\x1d.hermes.SearchHit.FieldsEntry\x1a\x41\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.hermes.FieldValue:\x02\x38\x01\"\xdb\x01\n\nFieldValue\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x12\r\n\x03u64\x18\x02 \x01(\x04H\x00\x12\r\n\x03i64\x18\x03 \x01(\x03H\x00\x12\r\n\x03\x66\x36\x34\x18\x04 \x01(\x01H\x00\x12\x15\n\x0b\x62ytes_value\x18\x05 \x01(\x0cH\x00\x12-\n\rsparse_vector\x18\x06 \x01(\x0b\x32\x14.hermes.SparseVectorH\x00\x12+\n\x0c\x64\x65nse_vector\x18\x07 \x01(\x0b\x32\x13.hermes.DenseVectorH\x00\x12\x14\n\njson_value\x18\x08 \x01(\tH\x00\x42\x07\n\x05value\"/\n\x0cSparseVector\x12\x0f\n\x07indices\x18\x01 \x03(\r\x12\x0e\n\x06values\x18\x02 \x03(\x02\"\x1d\n\x0b\x44\x65nseVector\x12\x0e\n\x06values\x18\x01 \x03(\x02\"V\n\x0eSearchResponse\x12\x1f\n\x04hits\x18\x01 \x03(\x0b\x32\x11.hermes.SearchHit\x12\x12\n\ntotal_hits\x18\x02 \x01(\r\x12\x0f\n\x07took_ms\x18\x03 \x01(\x04\"8\n\x12GetDocumentRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x0e\n\x06\x64oc_id\x18\x02 \x01(\r\"\x91\x01\n\x13GetDocumentResponse\x12\x37\n\x06\x66ields\x18\x01 \x03(\x0b\x32\'.hermes.GetDocumentResponse.FieldsEntry\x1a\x41\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.hermes.FieldValue:\x02\x38\x01\")\n\x13GetIndexInfoRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\"b\n\x14GetIndexInfoResponse\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x10\n\x08num_docs\x18\x02 \x01(\r\x12\x14\n\x0cnum_segments\x18\x03 \x01(\r\x12\x0e\n\x06schema\x18\x04 \x01(\t\"8\n\x12\x43reateIndexRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t\"&\n\x13\x43reateIndexResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"\x85\x01\n\rNamedDocument\x12\x31\n\x06\x66ields\x18\x01 \x03(\x0b\x32!.hermes.NamedDocument.FieldsEntry\x1a\x41\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.hermes.FieldValue:\x02\x38\x01\"Z\n\x1a\x42\x61tchIndexDocumentsRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12(\n\tdocuments\x18\x02 \x03(\x0b\x32\x15.hermes.NamedDocument\"I\n\x1b\x42\x61tchIndexDocumentsResponse\x12\x15\n\rindexed_count\x18\x01 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\x02 \x01(\r\"\xa7\x01\n\x14IndexDocumentRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x38\n\x06\x66ields\x18\x02 \x03(\x0b\x32(.hermes.IndexDocumentRequest.FieldsEntry\x1a\x41\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.hermes.FieldValue:\x02\x38\x01\"/\n\x16IndexDocumentsResponse\x12\x15\n\rindexed_count\x18\x01 \x01(\r\"#\n\rCommitRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\"3\n\x0e\x43ommitResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x10\n\x08num_docs\x18\x02 \x01(\r\"\'\n\x11\x46orceMergeRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\";\n\x12\x46orceMergeResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x14\n\x0cnum_segments\x18\x02 \x01(\r\"(\n\x12\x44\x65leteIndexRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\"&\n\x13\x44\x65leteIndexResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x32\xdb\x01\n\rSearchService\x12\x37\n\x06Search\x12\x15.hermes.SearchRequest\x1a\x16.hermes.SearchResponse\x12\x46\n\x0bGetDocument\x12\x1a.hermes.GetDocumentRequest\x1a\x1b.hermes.GetDocumentResponse\x12I\n\x0cGetIndexInfo\x12\x1b.hermes.GetIndexInfoRequest\x1a\x1c.hermes.GetIndexInfoResponse2\xce\x03\n\x0cIndexService\x12\x46\n\x0b\x43reateIndex\x12\x1a.hermes.CreateIndexRequest\x1a\x1b.hermes.CreateIndexResponse\x12P\n\x0eIndexDocuments\x12\x1c.hermes.IndexDocumentRequest\x1a\x1e.hermes.IndexDocumentsResponse(\x01\x12^\n\x13\x42\x61tchIndexDocuments\x12\".hermes.BatchIndexDocumentsRequest\x1a#.hermes.BatchIndexDocumentsResponse\x12\x37\n\x06\x43ommit\x12\x15.hermes.CommitRequest\x1a\x16.hermes.CommitResponse\x12\x43\n\nForceMerge\x12\x19.hermes.ForceMergeRequest\x1a\x1a.hermes.ForceMergeResponse\x12\x46\n\x0b\x44\x65leteIndex\x12\x1a.hermes.DeleteIndexRequest\x1a\x1b.hermes.DeleteIndexResponseb\x06proto3')
|
|
28
|
+
|
|
29
|
+
_globals = globals()
|
|
30
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'hermes_pb2', _globals)
|
|
32
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
+
DESCRIPTOR._loaded_options = None
|
|
34
|
+
_globals['_SEARCHHIT_FIELDSENTRY']._loaded_options = None
|
|
35
|
+
_globals['_SEARCHHIT_FIELDSENTRY']._serialized_options = b'8\001'
|
|
36
|
+
_globals['_GETDOCUMENTRESPONSE_FIELDSENTRY']._loaded_options = None
|
|
37
|
+
_globals['_GETDOCUMENTRESPONSE_FIELDSENTRY']._serialized_options = b'8\001'
|
|
38
|
+
_globals['_NAMEDDOCUMENT_FIELDSENTRY']._loaded_options = None
|
|
39
|
+
_globals['_NAMEDDOCUMENT_FIELDSENTRY']._serialized_options = b'8\001'
|
|
40
|
+
_globals['_INDEXDOCUMENTREQUEST_FIELDSENTRY']._loaded_options = None
|
|
41
|
+
_globals['_INDEXDOCUMENTREQUEST_FIELDSENTRY']._serialized_options = b'8\001'
|
|
42
|
+
_globals['_QUERY']._serialized_start=25
|
|
43
|
+
_globals['_QUERY']._serialized_end=289
|
|
44
|
+
_globals['_SPARSEVECTORQUERY']._serialized_start=291
|
|
45
|
+
_globals['_SPARSEVECTORQUERY']._serialized_end=358
|
|
46
|
+
_globals['_DENSEVECTORQUERY']._serialized_start=360
|
|
47
|
+
_globals['_DENSEVECTORQUERY']._serialized_end=448
|
|
48
|
+
_globals['_TERMQUERY']._serialized_start=450
|
|
49
|
+
_globals['_TERMQUERY']._serialized_end=490
|
|
50
|
+
_globals['_BOOLEANQUERY']._serialized_start=492
|
|
51
|
+
_globals['_BOOLEANQUERY']._serialized_end=599
|
|
52
|
+
_globals['_BOOSTQUERY']._serialized_start=601
|
|
53
|
+
_globals['_BOOSTQUERY']._serialized_end=658
|
|
54
|
+
_globals['_ALLQUERY']._serialized_start=660
|
|
55
|
+
_globals['_ALLQUERY']._serialized_end=670
|
|
56
|
+
_globals['_SEARCHREQUEST']._serialized_start=672
|
|
57
|
+
_globals['_SEARCHREQUEST']._serialized_end=792
|
|
58
|
+
_globals['_SEARCHHIT']._serialized_start=795
|
|
59
|
+
_globals['_SEARCHHIT']._serialized_end=951
|
|
60
|
+
_globals['_SEARCHHIT_FIELDSENTRY']._serialized_start=886
|
|
61
|
+
_globals['_SEARCHHIT_FIELDSENTRY']._serialized_end=951
|
|
62
|
+
_globals['_FIELDVALUE']._serialized_start=954
|
|
63
|
+
_globals['_FIELDVALUE']._serialized_end=1173
|
|
64
|
+
_globals['_SPARSEVECTOR']._serialized_start=1175
|
|
65
|
+
_globals['_SPARSEVECTOR']._serialized_end=1222
|
|
66
|
+
_globals['_DENSEVECTOR']._serialized_start=1224
|
|
67
|
+
_globals['_DENSEVECTOR']._serialized_end=1253
|
|
68
|
+
_globals['_SEARCHRESPONSE']._serialized_start=1255
|
|
69
|
+
_globals['_SEARCHRESPONSE']._serialized_end=1341
|
|
70
|
+
_globals['_GETDOCUMENTREQUEST']._serialized_start=1343
|
|
71
|
+
_globals['_GETDOCUMENTREQUEST']._serialized_end=1399
|
|
72
|
+
_globals['_GETDOCUMENTRESPONSE']._serialized_start=1402
|
|
73
|
+
_globals['_GETDOCUMENTRESPONSE']._serialized_end=1547
|
|
74
|
+
_globals['_GETDOCUMENTRESPONSE_FIELDSENTRY']._serialized_start=886
|
|
75
|
+
_globals['_GETDOCUMENTRESPONSE_FIELDSENTRY']._serialized_end=951
|
|
76
|
+
_globals['_GETINDEXINFOREQUEST']._serialized_start=1549
|
|
77
|
+
_globals['_GETINDEXINFOREQUEST']._serialized_end=1590
|
|
78
|
+
_globals['_GETINDEXINFORESPONSE']._serialized_start=1592
|
|
79
|
+
_globals['_GETINDEXINFORESPONSE']._serialized_end=1690
|
|
80
|
+
_globals['_CREATEINDEXREQUEST']._serialized_start=1692
|
|
81
|
+
_globals['_CREATEINDEXREQUEST']._serialized_end=1748
|
|
82
|
+
_globals['_CREATEINDEXRESPONSE']._serialized_start=1750
|
|
83
|
+
_globals['_CREATEINDEXRESPONSE']._serialized_end=1788
|
|
84
|
+
_globals['_NAMEDDOCUMENT']._serialized_start=1791
|
|
85
|
+
_globals['_NAMEDDOCUMENT']._serialized_end=1924
|
|
86
|
+
_globals['_NAMEDDOCUMENT_FIELDSENTRY']._serialized_start=886
|
|
87
|
+
_globals['_NAMEDDOCUMENT_FIELDSENTRY']._serialized_end=951
|
|
88
|
+
_globals['_BATCHINDEXDOCUMENTSREQUEST']._serialized_start=1926
|
|
89
|
+
_globals['_BATCHINDEXDOCUMENTSREQUEST']._serialized_end=2016
|
|
90
|
+
_globals['_BATCHINDEXDOCUMENTSRESPONSE']._serialized_start=2018
|
|
91
|
+
_globals['_BATCHINDEXDOCUMENTSRESPONSE']._serialized_end=2091
|
|
92
|
+
_globals['_INDEXDOCUMENTREQUEST']._serialized_start=2094
|
|
93
|
+
_globals['_INDEXDOCUMENTREQUEST']._serialized_end=2261
|
|
94
|
+
_globals['_INDEXDOCUMENTREQUEST_FIELDSENTRY']._serialized_start=886
|
|
95
|
+
_globals['_INDEXDOCUMENTREQUEST_FIELDSENTRY']._serialized_end=951
|
|
96
|
+
_globals['_INDEXDOCUMENTSRESPONSE']._serialized_start=2263
|
|
97
|
+
_globals['_INDEXDOCUMENTSRESPONSE']._serialized_end=2310
|
|
98
|
+
_globals['_COMMITREQUEST']._serialized_start=2312
|
|
99
|
+
_globals['_COMMITREQUEST']._serialized_end=2347
|
|
100
|
+
_globals['_COMMITRESPONSE']._serialized_start=2349
|
|
101
|
+
_globals['_COMMITRESPONSE']._serialized_end=2400
|
|
102
|
+
_globals['_FORCEMERGEREQUEST']._serialized_start=2402
|
|
103
|
+
_globals['_FORCEMERGEREQUEST']._serialized_end=2441
|
|
104
|
+
_globals['_FORCEMERGERESPONSE']._serialized_start=2443
|
|
105
|
+
_globals['_FORCEMERGERESPONSE']._serialized_end=2502
|
|
106
|
+
_globals['_DELETEINDEXREQUEST']._serialized_start=2504
|
|
107
|
+
_globals['_DELETEINDEXREQUEST']._serialized_end=2544
|
|
108
|
+
_globals['_DELETEINDEXRESPONSE']._serialized_start=2546
|
|
109
|
+
_globals['_DELETEINDEXRESPONSE']._serialized_end=2584
|
|
110
|
+
_globals['_SEARCHSERVICE']._serialized_start=2587
|
|
111
|
+
_globals['_SEARCHSERVICE']._serialized_end=2806
|
|
112
|
+
_globals['_INDEXSERVICE']._serialized_start=2809
|
|
113
|
+
_globals['_INDEXSERVICE']._serialized_end=3271
|
|
114
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
-
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
-
# source: hermes.proto
|
|
5
|
-
# Protobuf Python Version: 6.31.1
|
|
6
|
-
"""Generated protocol buffer code."""
|
|
7
|
-
from google.protobuf import descriptor as _descriptor
|
|
8
|
-
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
-
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
-
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
-
from google.protobuf.internal import builder as _builder
|
|
12
|
-
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
-
_runtime_version.Domain.PUBLIC,
|
|
14
|
-
6,
|
|
15
|
-
31,
|
|
16
|
-
1,
|
|
17
|
-
'',
|
|
18
|
-
'hermes.proto'
|
|
19
|
-
)
|
|
20
|
-
# @@protoc_insertion_point(imports)
|
|
21
|
-
|
|
22
|
-
_sym_db = _symbol_database.Default()
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0chermes.proto\x12\x06hermes\"\xa2\x01\n\x05Query\x12!\n\x04term\x18\x01 \x01(\x0b\x32\x11.hermes.TermQueryH\x00\x12\'\n\x07\x62oolean\x18\x02 \x01(\x0b\x32\x14.hermes.BooleanQueryH\x00\x12#\n\x05\x62oost\x18\x03 \x01(\x0b\x32\x12.hermes.BoostQueryH\x00\x12\x1f\n\x03\x61ll\x18\x04 \x01(\x0b\x32\x10.hermes.AllQueryH\x00\x42\x07\n\x05query\"(\n\tTermQuery\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04term\x18\x02 \x01(\t\"k\n\x0c\x42ooleanQuery\x12\x1b\n\x04must\x18\x01 \x03(\x0b\x32\r.hermes.Query\x12\x1d\n\x06should\x18\x02 \x03(\x0b\x32\r.hermes.Query\x12\x1f\n\x08must_not\x18\x03 \x03(\x0b\x32\r.hermes.Query\"9\n\nBoostQuery\x12\x1c\n\x05query\x18\x01 \x01(\x0b\x32\r.hermes.Query\x12\r\n\x05\x62oost\x18\x02 \x01(\x02\"\n\n\x08\x41llQuery\"x\n\rSearchRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x1c\n\x05query\x18\x02 \x01(\x0b\x32\r.hermes.Query\x12\r\n\x05limit\x18\x03 \x01(\r\x12\x0e\n\x06offset\x18\x04 \x01(\r\x12\x16\n\x0e\x66ields_to_load\x18\x05 \x03(\t\"\x9c\x01\n\tSearchHit\x12\x0e\n\x06\x64oc_id\x18\x01 \x01(\r\x12\r\n\x05score\x18\x02 \x01(\x02\x12-\n\x06\x66ields\x18\x03 \x03(\x0b\x32\x1d.hermes.SearchHit.FieldsEntry\x1a\x41\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.hermes.FieldValue:\x02\x38\x01\"\xdb\x01\n\nFieldValue\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x12\r\n\x03u64\x18\x02 \x01(\x04H\x00\x12\r\n\x03i64\x18\x03 \x01(\x03H\x00\x12\r\n\x03\x66\x36\x34\x18\x04 \x01(\x01H\x00\x12\x15\n\x0b\x62ytes_value\x18\x05 \x01(\x0cH\x00\x12-\n\rsparse_vector\x18\x06 \x01(\x0b\x32\x14.hermes.SparseVectorH\x00\x12+\n\x0c\x64\x65nse_vector\x18\x07 \x01(\x0b\x32\x13.hermes.DenseVectorH\x00\x12\x14\n\njson_value\x18\x08 \x01(\tH\x00\x42\x07\n\x05value\"/\n\x0cSparseVector\x12\x0f\n\x07indices\x18\x01 \x03(\r\x12\x0e\n\x06values\x18\x02 \x03(\x02\"\x1d\n\x0b\x44\x65nseVector\x12\x0e\n\x06values\x18\x01 \x03(\x02\"V\n\x0eSearchResponse\x12\x1f\n\x04hits\x18\x01 \x03(\x0b\x32\x11.hermes.SearchHit\x12\x12\n\ntotal_hits\x18\x02 \x01(\r\x12\x0f\n\x07took_ms\x18\x03 \x01(\x04\"8\n\x12GetDocumentRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x0e\n\x06\x64oc_id\x18\x02 \x01(\r\"\x91\x01\n\x13GetDocumentResponse\x12\x37\n\x06\x66ields\x18\x01 \x03(\x0b\x32\'.hermes.GetDocumentResponse.FieldsEntry\x1a\x41\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.hermes.FieldValue:\x02\x38\x01\")\n\x13GetIndexInfoRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\"b\n\x14GetIndexInfoResponse\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x10\n\x08num_docs\x18\x02 \x01(\r\x12\x14\n\x0cnum_segments\x18\x03 \x01(\r\x12\x0e\n\x06schema\x18\x04 \x01(\t\"8\n\x12\x43reateIndexRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t\"&\n\x13\x43reateIndexResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"\x85\x01\n\rNamedDocument\x12\x31\n\x06\x66ields\x18\x01 \x03(\x0b\x32!.hermes.NamedDocument.FieldsEntry\x1a\x41\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.hermes.FieldValue:\x02\x38\x01\"Z\n\x1a\x42\x61tchIndexDocumentsRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12(\n\tdocuments\x18\x02 \x03(\x0b\x32\x15.hermes.NamedDocument\"I\n\x1b\x42\x61tchIndexDocumentsResponse\x12\x15\n\rindexed_count\x18\x01 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\x02 \x01(\r\"\xa7\x01\n\x14IndexDocumentRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x38\n\x06\x66ields\x18\x02 \x03(\x0b\x32(.hermes.IndexDocumentRequest.FieldsEntry\x1a\x41\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.hermes.FieldValue:\x02\x38\x01\"/\n\x16IndexDocumentsResponse\x12\x15\n\rindexed_count\x18\x01 \x01(\r\"#\n\rCommitRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\"3\n\x0e\x43ommitResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x10\n\x08num_docs\x18\x02 \x01(\r\"\'\n\x11\x46orceMergeRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\";\n\x12\x46orceMergeResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x14\n\x0cnum_segments\x18\x02 \x01(\r\"(\n\x12\x44\x65leteIndexRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\"&\n\x13\x44\x65leteIndexResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x32\xdb\x01\n\rSearchService\x12\x37\n\x06Search\x12\x15.hermes.SearchRequest\x1a\x16.hermes.SearchResponse\x12\x46\n\x0bGetDocument\x12\x1a.hermes.GetDocumentRequest\x1a\x1b.hermes.GetDocumentResponse\x12I\n\x0cGetIndexInfo\x12\x1b.hermes.GetIndexInfoRequest\x1a\x1c.hermes.GetIndexInfoResponse2\xce\x03\n\x0cIndexService\x12\x46\n\x0b\x43reateIndex\x12\x1a.hermes.CreateIndexRequest\x1a\x1b.hermes.CreateIndexResponse\x12P\n\x0eIndexDocuments\x12\x1c.hermes.IndexDocumentRequest\x1a\x1e.hermes.IndexDocumentsResponse(\x01\x12^\n\x13\x42\x61tchIndexDocuments\x12\".hermes.BatchIndexDocumentsRequest\x1a#.hermes.BatchIndexDocumentsResponse\x12\x37\n\x06\x43ommit\x12\x15.hermes.CommitRequest\x1a\x16.hermes.CommitResponse\x12\x43\n\nForceMerge\x12\x19.hermes.ForceMergeRequest\x1a\x1a.hermes.ForceMergeResponse\x12\x46\n\x0b\x44\x65leteIndex\x12\x1a.hermes.DeleteIndexRequest\x1a\x1b.hermes.DeleteIndexResponseb\x06proto3')
|
|
28
|
-
|
|
29
|
-
_globals = globals()
|
|
30
|
-
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'hermes_pb2', _globals)
|
|
32
|
-
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
-
DESCRIPTOR._loaded_options = None
|
|
34
|
-
_globals['_SEARCHHIT_FIELDSENTRY']._loaded_options = None
|
|
35
|
-
_globals['_SEARCHHIT_FIELDSENTRY']._serialized_options = b'8\001'
|
|
36
|
-
_globals['_GETDOCUMENTRESPONSE_FIELDSENTRY']._loaded_options = None
|
|
37
|
-
_globals['_GETDOCUMENTRESPONSE_FIELDSENTRY']._serialized_options = b'8\001'
|
|
38
|
-
_globals['_NAMEDDOCUMENT_FIELDSENTRY']._loaded_options = None
|
|
39
|
-
_globals['_NAMEDDOCUMENT_FIELDSENTRY']._serialized_options = b'8\001'
|
|
40
|
-
_globals['_INDEXDOCUMENTREQUEST_FIELDSENTRY']._loaded_options = None
|
|
41
|
-
_globals['_INDEXDOCUMENTREQUEST_FIELDSENTRY']._serialized_options = b'8\001'
|
|
42
|
-
_globals['_QUERY']._serialized_start=25
|
|
43
|
-
_globals['_QUERY']._serialized_end=187
|
|
44
|
-
_globals['_TERMQUERY']._serialized_start=189
|
|
45
|
-
_globals['_TERMQUERY']._serialized_end=229
|
|
46
|
-
_globals['_BOOLEANQUERY']._serialized_start=231
|
|
47
|
-
_globals['_BOOLEANQUERY']._serialized_end=338
|
|
48
|
-
_globals['_BOOSTQUERY']._serialized_start=340
|
|
49
|
-
_globals['_BOOSTQUERY']._serialized_end=397
|
|
50
|
-
_globals['_ALLQUERY']._serialized_start=399
|
|
51
|
-
_globals['_ALLQUERY']._serialized_end=409
|
|
52
|
-
_globals['_SEARCHREQUEST']._serialized_start=411
|
|
53
|
-
_globals['_SEARCHREQUEST']._serialized_end=531
|
|
54
|
-
_globals['_SEARCHHIT']._serialized_start=534
|
|
55
|
-
_globals['_SEARCHHIT']._serialized_end=690
|
|
56
|
-
_globals['_SEARCHHIT_FIELDSENTRY']._serialized_start=625
|
|
57
|
-
_globals['_SEARCHHIT_FIELDSENTRY']._serialized_end=690
|
|
58
|
-
_globals['_FIELDVALUE']._serialized_start=693
|
|
59
|
-
_globals['_FIELDVALUE']._serialized_end=912
|
|
60
|
-
_globals['_SPARSEVECTOR']._serialized_start=914
|
|
61
|
-
_globals['_SPARSEVECTOR']._serialized_end=961
|
|
62
|
-
_globals['_DENSEVECTOR']._serialized_start=963
|
|
63
|
-
_globals['_DENSEVECTOR']._serialized_end=992
|
|
64
|
-
_globals['_SEARCHRESPONSE']._serialized_start=994
|
|
65
|
-
_globals['_SEARCHRESPONSE']._serialized_end=1080
|
|
66
|
-
_globals['_GETDOCUMENTREQUEST']._serialized_start=1082
|
|
67
|
-
_globals['_GETDOCUMENTREQUEST']._serialized_end=1138
|
|
68
|
-
_globals['_GETDOCUMENTRESPONSE']._serialized_start=1141
|
|
69
|
-
_globals['_GETDOCUMENTRESPONSE']._serialized_end=1286
|
|
70
|
-
_globals['_GETDOCUMENTRESPONSE_FIELDSENTRY']._serialized_start=625
|
|
71
|
-
_globals['_GETDOCUMENTRESPONSE_FIELDSENTRY']._serialized_end=690
|
|
72
|
-
_globals['_GETINDEXINFOREQUEST']._serialized_start=1288
|
|
73
|
-
_globals['_GETINDEXINFOREQUEST']._serialized_end=1329
|
|
74
|
-
_globals['_GETINDEXINFORESPONSE']._serialized_start=1331
|
|
75
|
-
_globals['_GETINDEXINFORESPONSE']._serialized_end=1429
|
|
76
|
-
_globals['_CREATEINDEXREQUEST']._serialized_start=1431
|
|
77
|
-
_globals['_CREATEINDEXREQUEST']._serialized_end=1487
|
|
78
|
-
_globals['_CREATEINDEXRESPONSE']._serialized_start=1489
|
|
79
|
-
_globals['_CREATEINDEXRESPONSE']._serialized_end=1527
|
|
80
|
-
_globals['_NAMEDDOCUMENT']._serialized_start=1530
|
|
81
|
-
_globals['_NAMEDDOCUMENT']._serialized_end=1663
|
|
82
|
-
_globals['_NAMEDDOCUMENT_FIELDSENTRY']._serialized_start=625
|
|
83
|
-
_globals['_NAMEDDOCUMENT_FIELDSENTRY']._serialized_end=690
|
|
84
|
-
_globals['_BATCHINDEXDOCUMENTSREQUEST']._serialized_start=1665
|
|
85
|
-
_globals['_BATCHINDEXDOCUMENTSREQUEST']._serialized_end=1755
|
|
86
|
-
_globals['_BATCHINDEXDOCUMENTSRESPONSE']._serialized_start=1757
|
|
87
|
-
_globals['_BATCHINDEXDOCUMENTSRESPONSE']._serialized_end=1830
|
|
88
|
-
_globals['_INDEXDOCUMENTREQUEST']._serialized_start=1833
|
|
89
|
-
_globals['_INDEXDOCUMENTREQUEST']._serialized_end=2000
|
|
90
|
-
_globals['_INDEXDOCUMENTREQUEST_FIELDSENTRY']._serialized_start=625
|
|
91
|
-
_globals['_INDEXDOCUMENTREQUEST_FIELDSENTRY']._serialized_end=690
|
|
92
|
-
_globals['_INDEXDOCUMENTSRESPONSE']._serialized_start=2002
|
|
93
|
-
_globals['_INDEXDOCUMENTSRESPONSE']._serialized_end=2049
|
|
94
|
-
_globals['_COMMITREQUEST']._serialized_start=2051
|
|
95
|
-
_globals['_COMMITREQUEST']._serialized_end=2086
|
|
96
|
-
_globals['_COMMITRESPONSE']._serialized_start=2088
|
|
97
|
-
_globals['_COMMITRESPONSE']._serialized_end=2139
|
|
98
|
-
_globals['_FORCEMERGEREQUEST']._serialized_start=2141
|
|
99
|
-
_globals['_FORCEMERGEREQUEST']._serialized_end=2180
|
|
100
|
-
_globals['_FORCEMERGERESPONSE']._serialized_start=2182
|
|
101
|
-
_globals['_FORCEMERGERESPONSE']._serialized_end=2241
|
|
102
|
-
_globals['_DELETEINDEXREQUEST']._serialized_start=2243
|
|
103
|
-
_globals['_DELETEINDEXREQUEST']._serialized_end=2283
|
|
104
|
-
_globals['_DELETEINDEXRESPONSE']._serialized_start=2285
|
|
105
|
-
_globals['_DELETEINDEXRESPONSE']._serialized_end=2323
|
|
106
|
-
_globals['_SEARCHSERVICE']._serialized_start=2326
|
|
107
|
-
_globals['_SEARCHSERVICE']._serialized_end=2545
|
|
108
|
-
_globals['_INDEXSERVICE']._serialized_start=2548
|
|
109
|
-
_globals['_INDEXSERVICE']._serialized_end=3010
|
|
110
|
-
# @@protoc_insertion_point(module_scope)
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
|
-
# NO CHECKED-IN PROTOBUF GENCODE
|
|
3
|
-
# source: hermes.proto
|
|
4
|
-
# Protobuf Python Version: 6.31.1
|
|
5
|
-
"""Generated protocol buffer code."""
|
|
6
|
-
|
|
7
|
-
from google.protobuf import descriptor as _descriptor
|
|
8
|
-
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
-
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
-
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
-
from google.protobuf.internal import builder as _builder
|
|
12
|
-
|
|
13
|
-
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
14
|
-
_runtime_version.Domain.PUBLIC, 6, 31, 1, "", "hermes.proto"
|
|
15
|
-
)
|
|
16
|
-
# @@protoc_insertion_point(imports)
|
|
17
|
-
|
|
18
|
-
_sym_db = _symbol_database.Default()
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
|
|
22
|
-
b'\n\x0chermes.proto\x12\x06hermes"\xa2\x01\n\x05Query\x12!\n\x04term\x18\x01 \x01(\x0b\x32\x11.hermes.TermQueryH\x00\x12\'\n\x07\x62oolean\x18\x02 \x01(\x0b\x32\x14.hermes.BooleanQueryH\x00\x12#\n\x05\x62oost\x18\x03 \x01(\x0b\x32\x12.hermes.BoostQueryH\x00\x12\x1f\n\x03\x61ll\x18\x04 \x01(\x0b\x32\x10.hermes.AllQueryH\x00\x42\x07\n\x05query"(\n\tTermQuery\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04term\x18\x02 \x01(\t"k\n\x0c\x42ooleanQuery\x12\x1b\n\x04must\x18\x01 \x03(\x0b\x32\r.hermes.Query\x12\x1d\n\x06should\x18\x02 \x03(\x0b\x32\r.hermes.Query\x12\x1f\n\x08must_not\x18\x03 \x03(\x0b\x32\r.hermes.Query"9\n\nBoostQuery\x12\x1c\n\x05query\x18\x01 \x01(\x0b\x32\r.hermes.Query\x12\r\n\x05\x62oost\x18\x02 \x01(\x02"\n\n\x08\x41llQuery"x\n\rSearchRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x1c\n\x05query\x18\x02 \x01(\x0b\x32\r.hermes.Query\x12\r\n\x05limit\x18\x03 \x01(\r\x12\x0e\n\x06offset\x18\x04 \x01(\r\x12\x16\n\x0e\x66ields_to_load\x18\x05 \x03(\t"\x9c\x01\n\tSearchHit\x12\x0e\n\x06\x64oc_id\x18\x01 \x01(\r\x12\r\n\x05score\x18\x02 \x01(\x02\x12-\n\x06\x66ields\x18\x03 \x03(\x0b\x32\x1d.hermes.SearchHit.FieldsEntry\x1a\x41\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.hermes.FieldValue:\x02\x38\x01"\xdb\x01\n\nFieldValue\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x12\r\n\x03u64\x18\x02 \x01(\x04H\x00\x12\r\n\x03i64\x18\x03 \x01(\x03H\x00\x12\r\n\x03\x66\x36\x34\x18\x04 \x01(\x01H\x00\x12\x15\n\x0b\x62ytes_value\x18\x05 \x01(\x0cH\x00\x12-\n\rsparse_vector\x18\x06 \x01(\x0b\x32\x14.hermes.SparseVectorH\x00\x12+\n\x0c\x64\x65nse_vector\x18\x07 \x01(\x0b\x32\x13.hermes.DenseVectorH\x00\x12\x14\n\njson_value\x18\x08 \x01(\tH\x00\x42\x07\n\x05value"/\n\x0cSparseVector\x12\x0f\n\x07indices\x18\x01 \x03(\r\x12\x0e\n\x06values\x18\x02 \x03(\x02"\x1d\n\x0b\x44\x65nseVector\x12\x0e\n\x06values\x18\x01 \x03(\x02"V\n\x0eSearchResponse\x12\x1f\n\x04hits\x18\x01 \x03(\x0b\x32\x11.hermes.SearchHit\x12\x12\n\ntotal_hits\x18\x02 \x01(\r\x12\x0f\n\x07took_ms\x18\x03 \x01(\x04"8\n\x12GetDocumentRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x0e\n\x06\x64oc_id\x18\x02 \x01(\r"\x91\x01\n\x13GetDocumentResponse\x12\x37\n\x06\x66ields\x18\x01 \x03(\x0b\x32\'.hermes.GetDocumentResponse.FieldsEntry\x1a\x41\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.hermes.FieldValue:\x02\x38\x01")\n\x13GetIndexInfoRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t"b\n\x14GetIndexInfoResponse\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x10\n\x08num_docs\x18\x02 \x01(\r\x12\x14\n\x0cnum_segments\x18\x03 \x01(\r\x12\x0e\n\x06schema\x18\x04 \x01(\t"8\n\x12\x43reateIndexRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t"&\n\x13\x43reateIndexResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08"\x85\x01\n\rNamedDocument\x12\x31\n\x06\x66ields\x18\x01 \x03(\x0b\x32!.hermes.NamedDocument.FieldsEntry\x1a\x41\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.hermes.FieldValue:\x02\x38\x01"Z\n\x1a\x42\x61tchIndexDocumentsRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12(\n\tdocuments\x18\x02 \x03(\x0b\x32\x15.hermes.NamedDocument"I\n\x1b\x42\x61tchIndexDocumentsResponse\x12\x15\n\rindexed_count\x18\x01 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\x02 \x01(\r"\xa7\x01\n\x14IndexDocumentRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x38\n\x06\x66ields\x18\x02 \x03(\x0b\x32(.hermes.IndexDocumentRequest.FieldsEntry\x1a\x41\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.hermes.FieldValue:\x02\x38\x01"/\n\x16IndexDocumentsResponse\x12\x15\n\rindexed_count\x18\x01 \x01(\r"#\n\rCommitRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t"3\n\x0e\x43ommitResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x10\n\x08num_docs\x18\x02 \x01(\r"\'\n\x11\x46orceMergeRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t";\n\x12\x46orceMergeResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x14\n\x0cnum_segments\x18\x02 \x01(\r"(\n\x12\x44\x65leteIndexRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t"&\n\x13\x44\x65leteIndexResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x32\xdb\x01\n\rSearchService\x12\x37\n\x06Search\x12\x15.hermes.SearchRequest\x1a\x16.hermes.SearchResponse\x12\x46\n\x0bGetDocument\x12\x1a.hermes.GetDocumentRequest\x1a\x1b.hermes.GetDocumentResponse\x12I\n\x0cGetIndexInfo\x12\x1b.hermes.GetIndexInfoRequest\x1a\x1c.hermes.GetIndexInfoResponse2\xce\x03\n\x0cIndexService\x12\x46\n\x0b\x43reateIndex\x12\x1a.hermes.CreateIndexRequest\x1a\x1b.hermes.CreateIndexResponse\x12P\n\x0eIndexDocuments\x12\x1c.hermes.IndexDocumentRequest\x1a\x1e.hermes.IndexDocumentsResponse(\x01\x12^\n\x13\x42\x61tchIndexDocuments\x12".hermes.BatchIndexDocumentsRequest\x1a#.hermes.BatchIndexDocumentsResponse\x12\x37\n\x06\x43ommit\x12\x15.hermes.CommitRequest\x1a\x16.hermes.CommitResponse\x12\x43\n\nForceMerge\x12\x19.hermes.ForceMergeRequest\x1a\x1a.hermes.ForceMergeResponse\x12\x46\n\x0b\x44\x65leteIndex\x12\x1a.hermes.DeleteIndexRequest\x1a\x1b.hermes.DeleteIndexResponseb\x06proto3'
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
_globals = globals()
|
|
26
|
-
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
27
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "hermes_pb2", _globals)
|
|
28
|
-
if not _descriptor._USE_C_DESCRIPTORS:
|
|
29
|
-
DESCRIPTOR._loaded_options = None
|
|
30
|
-
_globals["_SEARCHHIT_FIELDSENTRY"]._loaded_options = None
|
|
31
|
-
_globals["_SEARCHHIT_FIELDSENTRY"]._serialized_options = b"8\001"
|
|
32
|
-
_globals["_GETDOCUMENTRESPONSE_FIELDSENTRY"]._loaded_options = None
|
|
33
|
-
_globals["_GETDOCUMENTRESPONSE_FIELDSENTRY"]._serialized_options = b"8\001"
|
|
34
|
-
_globals["_NAMEDDOCUMENT_FIELDSENTRY"]._loaded_options = None
|
|
35
|
-
_globals["_NAMEDDOCUMENT_FIELDSENTRY"]._serialized_options = b"8\001"
|
|
36
|
-
_globals["_INDEXDOCUMENTREQUEST_FIELDSENTRY"]._loaded_options = None
|
|
37
|
-
_globals["_INDEXDOCUMENTREQUEST_FIELDSENTRY"]._serialized_options = b"8\001"
|
|
38
|
-
_globals["_QUERY"]._serialized_start = 25
|
|
39
|
-
_globals["_QUERY"]._serialized_end = 187
|
|
40
|
-
_globals["_TERMQUERY"]._serialized_start = 189
|
|
41
|
-
_globals["_TERMQUERY"]._serialized_end = 229
|
|
42
|
-
_globals["_BOOLEANQUERY"]._serialized_start = 231
|
|
43
|
-
_globals["_BOOLEANQUERY"]._serialized_end = 338
|
|
44
|
-
_globals["_BOOSTQUERY"]._serialized_start = 340
|
|
45
|
-
_globals["_BOOSTQUERY"]._serialized_end = 397
|
|
46
|
-
_globals["_ALLQUERY"]._serialized_start = 399
|
|
47
|
-
_globals["_ALLQUERY"]._serialized_end = 409
|
|
48
|
-
_globals["_SEARCHREQUEST"]._serialized_start = 411
|
|
49
|
-
_globals["_SEARCHREQUEST"]._serialized_end = 531
|
|
50
|
-
_globals["_SEARCHHIT"]._serialized_start = 534
|
|
51
|
-
_globals["_SEARCHHIT"]._serialized_end = 690
|
|
52
|
-
_globals["_SEARCHHIT_FIELDSENTRY"]._serialized_start = 625
|
|
53
|
-
_globals["_SEARCHHIT_FIELDSENTRY"]._serialized_end = 690
|
|
54
|
-
_globals["_FIELDVALUE"]._serialized_start = 693
|
|
55
|
-
_globals["_FIELDVALUE"]._serialized_end = 912
|
|
56
|
-
_globals["_SPARSEVECTOR"]._serialized_start = 914
|
|
57
|
-
_globals["_SPARSEVECTOR"]._serialized_end = 961
|
|
58
|
-
_globals["_DENSEVECTOR"]._serialized_start = 963
|
|
59
|
-
_globals["_DENSEVECTOR"]._serialized_end = 992
|
|
60
|
-
_globals["_SEARCHRESPONSE"]._serialized_start = 994
|
|
61
|
-
_globals["_SEARCHRESPONSE"]._serialized_end = 1080
|
|
62
|
-
_globals["_GETDOCUMENTREQUEST"]._serialized_start = 1082
|
|
63
|
-
_globals["_GETDOCUMENTREQUEST"]._serialized_end = 1138
|
|
64
|
-
_globals["_GETDOCUMENTRESPONSE"]._serialized_start = 1141
|
|
65
|
-
_globals["_GETDOCUMENTRESPONSE"]._serialized_end = 1286
|
|
66
|
-
_globals["_GETDOCUMENTRESPONSE_FIELDSENTRY"]._serialized_start = 625
|
|
67
|
-
_globals["_GETDOCUMENTRESPONSE_FIELDSENTRY"]._serialized_end = 690
|
|
68
|
-
_globals["_GETINDEXINFOREQUEST"]._serialized_start = 1288
|
|
69
|
-
_globals["_GETINDEXINFOREQUEST"]._serialized_end = 1329
|
|
70
|
-
_globals["_GETINDEXINFORESPONSE"]._serialized_start = 1331
|
|
71
|
-
_globals["_GETINDEXINFORESPONSE"]._serialized_end = 1429
|
|
72
|
-
_globals["_CREATEINDEXREQUEST"]._serialized_start = 1431
|
|
73
|
-
_globals["_CREATEINDEXREQUEST"]._serialized_end = 1487
|
|
74
|
-
_globals["_CREATEINDEXRESPONSE"]._serialized_start = 1489
|
|
75
|
-
_globals["_CREATEINDEXRESPONSE"]._serialized_end = 1527
|
|
76
|
-
_globals["_NAMEDDOCUMENT"]._serialized_start = 1530
|
|
77
|
-
_globals["_NAMEDDOCUMENT"]._serialized_end = 1663
|
|
78
|
-
_globals["_NAMEDDOCUMENT_FIELDSENTRY"]._serialized_start = 625
|
|
79
|
-
_globals["_NAMEDDOCUMENT_FIELDSENTRY"]._serialized_end = 690
|
|
80
|
-
_globals["_BATCHINDEXDOCUMENTSREQUEST"]._serialized_start = 1665
|
|
81
|
-
_globals["_BATCHINDEXDOCUMENTSREQUEST"]._serialized_end = 1755
|
|
82
|
-
_globals["_BATCHINDEXDOCUMENTSRESPONSE"]._serialized_start = 1757
|
|
83
|
-
_globals["_BATCHINDEXDOCUMENTSRESPONSE"]._serialized_end = 1830
|
|
84
|
-
_globals["_INDEXDOCUMENTREQUEST"]._serialized_start = 1833
|
|
85
|
-
_globals["_INDEXDOCUMENTREQUEST"]._serialized_end = 2000
|
|
86
|
-
_globals["_INDEXDOCUMENTREQUEST_FIELDSENTRY"]._serialized_start = 625
|
|
87
|
-
_globals["_INDEXDOCUMENTREQUEST_FIELDSENTRY"]._serialized_end = 690
|
|
88
|
-
_globals["_INDEXDOCUMENTSRESPONSE"]._serialized_start = 2002
|
|
89
|
-
_globals["_INDEXDOCUMENTSRESPONSE"]._serialized_end = 2049
|
|
90
|
-
_globals["_COMMITREQUEST"]._serialized_start = 2051
|
|
91
|
-
_globals["_COMMITREQUEST"]._serialized_end = 2086
|
|
92
|
-
_globals["_COMMITRESPONSE"]._serialized_start = 2088
|
|
93
|
-
_globals["_COMMITRESPONSE"]._serialized_end = 2139
|
|
94
|
-
_globals["_FORCEMERGEREQUEST"]._serialized_start = 2141
|
|
95
|
-
_globals["_FORCEMERGEREQUEST"]._serialized_end = 2180
|
|
96
|
-
_globals["_FORCEMERGERESPONSE"]._serialized_start = 2182
|
|
97
|
-
_globals["_FORCEMERGERESPONSE"]._serialized_end = 2241
|
|
98
|
-
_globals["_DELETEINDEXREQUEST"]._serialized_start = 2243
|
|
99
|
-
_globals["_DELETEINDEXREQUEST"]._serialized_end = 2283
|
|
100
|
-
_globals["_DELETEINDEXRESPONSE"]._serialized_start = 2285
|
|
101
|
-
_globals["_DELETEINDEXRESPONSE"]._serialized_end = 2323
|
|
102
|
-
_globals["_SEARCHSERVICE"]._serialized_start = 2326
|
|
103
|
-
_globals["_SEARCHSERVICE"]._serialized_end = 2545
|
|
104
|
-
_globals["_INDEXSERVICE"]._serialized_start = 2548
|
|
105
|
-
_globals["_INDEXSERVICE"]._serialized_end = 3010
|
|
106
|
-
# @@protoc_insertion_point(module_scope)
|
|
@@ -1,511 +0,0 @@
|
|
|
1
|
-
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
-
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
-
|
|
4
|
-
import grpc
|
|
5
|
-
|
|
6
|
-
from . import hermes_pb2 as hermes__pb2
|
|
7
|
-
|
|
8
|
-
GRPC_GENERATED_VERSION = "1.76.0"
|
|
9
|
-
GRPC_VERSION = grpc.__version__
|
|
10
|
-
_version_not_supported = False
|
|
11
|
-
|
|
12
|
-
try:
|
|
13
|
-
from grpc._utilities import first_version_is_lower
|
|
14
|
-
|
|
15
|
-
_version_not_supported = first_version_is_lower(
|
|
16
|
-
GRPC_VERSION, GRPC_GENERATED_VERSION
|
|
17
|
-
)
|
|
18
|
-
except ImportError:
|
|
19
|
-
_version_not_supported = True
|
|
20
|
-
|
|
21
|
-
if _version_not_supported:
|
|
22
|
-
raise RuntimeError(
|
|
23
|
-
f"The grpc package installed is at version {GRPC_VERSION},"
|
|
24
|
-
+ " but the generated code in hermes_pb2_grpc.py depends on"
|
|
25
|
-
+ f" grpcio>={GRPC_GENERATED_VERSION}."
|
|
26
|
-
+ f" Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}"
|
|
27
|
-
+ f" or downgrade your generated code using grpcio-tools<={GRPC_VERSION}."
|
|
28
|
-
)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
class SearchServiceStub:
|
|
32
|
-
"""Search service"""
|
|
33
|
-
|
|
34
|
-
def __init__(self, channel):
|
|
35
|
-
"""Constructor.
|
|
36
|
-
|
|
37
|
-
Args:
|
|
38
|
-
channel: A grpc.Channel.
|
|
39
|
-
"""
|
|
40
|
-
self.Search = channel.unary_unary(
|
|
41
|
-
"/hermes.SearchService/Search",
|
|
42
|
-
request_serializer=hermes__pb2.SearchRequest.SerializeToString,
|
|
43
|
-
response_deserializer=hermes__pb2.SearchResponse.FromString,
|
|
44
|
-
_registered_method=True,
|
|
45
|
-
)
|
|
46
|
-
self.GetDocument = channel.unary_unary(
|
|
47
|
-
"/hermes.SearchService/GetDocument",
|
|
48
|
-
request_serializer=hermes__pb2.GetDocumentRequest.SerializeToString,
|
|
49
|
-
response_deserializer=hermes__pb2.GetDocumentResponse.FromString,
|
|
50
|
-
_registered_method=True,
|
|
51
|
-
)
|
|
52
|
-
self.GetIndexInfo = channel.unary_unary(
|
|
53
|
-
"/hermes.SearchService/GetIndexInfo",
|
|
54
|
-
request_serializer=hermes__pb2.GetIndexInfoRequest.SerializeToString,
|
|
55
|
-
response_deserializer=hermes__pb2.GetIndexInfoResponse.FromString,
|
|
56
|
-
_registered_method=True,
|
|
57
|
-
)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
class SearchServiceServicer:
|
|
61
|
-
"""Search service"""
|
|
62
|
-
|
|
63
|
-
def Search(self, request, context):
|
|
64
|
-
"""Search for documents"""
|
|
65
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
66
|
-
context.set_details("Method not implemented!")
|
|
67
|
-
raise NotImplementedError("Method not implemented!")
|
|
68
|
-
|
|
69
|
-
def GetDocument(self, request, context):
|
|
70
|
-
"""Get document by ID"""
|
|
71
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
72
|
-
context.set_details("Method not implemented!")
|
|
73
|
-
raise NotImplementedError("Method not implemented!")
|
|
74
|
-
|
|
75
|
-
def GetIndexInfo(self, request, context):
|
|
76
|
-
"""Get index info"""
|
|
77
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
78
|
-
context.set_details("Method not implemented!")
|
|
79
|
-
raise NotImplementedError("Method not implemented!")
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
def add_SearchServiceServicer_to_server(servicer, server):
|
|
83
|
-
rpc_method_handlers = {
|
|
84
|
-
"Search": grpc.unary_unary_rpc_method_handler(
|
|
85
|
-
servicer.Search,
|
|
86
|
-
request_deserializer=hermes__pb2.SearchRequest.FromString,
|
|
87
|
-
response_serializer=hermes__pb2.SearchResponse.SerializeToString,
|
|
88
|
-
),
|
|
89
|
-
"GetDocument": grpc.unary_unary_rpc_method_handler(
|
|
90
|
-
servicer.GetDocument,
|
|
91
|
-
request_deserializer=hermes__pb2.GetDocumentRequest.FromString,
|
|
92
|
-
response_serializer=hermes__pb2.GetDocumentResponse.SerializeToString,
|
|
93
|
-
),
|
|
94
|
-
"GetIndexInfo": grpc.unary_unary_rpc_method_handler(
|
|
95
|
-
servicer.GetIndexInfo,
|
|
96
|
-
request_deserializer=hermes__pb2.GetIndexInfoRequest.FromString,
|
|
97
|
-
response_serializer=hermes__pb2.GetIndexInfoResponse.SerializeToString,
|
|
98
|
-
),
|
|
99
|
-
}
|
|
100
|
-
generic_handler = grpc.method_handlers_generic_handler(
|
|
101
|
-
"hermes.SearchService", rpc_method_handlers
|
|
102
|
-
)
|
|
103
|
-
server.add_generic_rpc_handlers((generic_handler,))
|
|
104
|
-
server.add_registered_method_handlers("hermes.SearchService", rpc_method_handlers)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
# This class is part of an EXPERIMENTAL API.
|
|
108
|
-
class SearchService:
|
|
109
|
-
"""Search service"""
|
|
110
|
-
|
|
111
|
-
@staticmethod
|
|
112
|
-
def Search(
|
|
113
|
-
request,
|
|
114
|
-
target,
|
|
115
|
-
options=(),
|
|
116
|
-
channel_credentials=None,
|
|
117
|
-
call_credentials=None,
|
|
118
|
-
insecure=False,
|
|
119
|
-
compression=None,
|
|
120
|
-
wait_for_ready=None,
|
|
121
|
-
timeout=None,
|
|
122
|
-
metadata=None,
|
|
123
|
-
):
|
|
124
|
-
return grpc.experimental.unary_unary(
|
|
125
|
-
request,
|
|
126
|
-
target,
|
|
127
|
-
"/hermes.SearchService/Search",
|
|
128
|
-
hermes__pb2.SearchRequest.SerializeToString,
|
|
129
|
-
hermes__pb2.SearchResponse.FromString,
|
|
130
|
-
options,
|
|
131
|
-
channel_credentials,
|
|
132
|
-
insecure,
|
|
133
|
-
call_credentials,
|
|
134
|
-
compression,
|
|
135
|
-
wait_for_ready,
|
|
136
|
-
timeout,
|
|
137
|
-
metadata,
|
|
138
|
-
_registered_method=True,
|
|
139
|
-
)
|
|
140
|
-
|
|
141
|
-
@staticmethod
|
|
142
|
-
def GetDocument(
|
|
143
|
-
request,
|
|
144
|
-
target,
|
|
145
|
-
options=(),
|
|
146
|
-
channel_credentials=None,
|
|
147
|
-
call_credentials=None,
|
|
148
|
-
insecure=False,
|
|
149
|
-
compression=None,
|
|
150
|
-
wait_for_ready=None,
|
|
151
|
-
timeout=None,
|
|
152
|
-
metadata=None,
|
|
153
|
-
):
|
|
154
|
-
return grpc.experimental.unary_unary(
|
|
155
|
-
request,
|
|
156
|
-
target,
|
|
157
|
-
"/hermes.SearchService/GetDocument",
|
|
158
|
-
hermes__pb2.GetDocumentRequest.SerializeToString,
|
|
159
|
-
hermes__pb2.GetDocumentResponse.FromString,
|
|
160
|
-
options,
|
|
161
|
-
channel_credentials,
|
|
162
|
-
insecure,
|
|
163
|
-
call_credentials,
|
|
164
|
-
compression,
|
|
165
|
-
wait_for_ready,
|
|
166
|
-
timeout,
|
|
167
|
-
metadata,
|
|
168
|
-
_registered_method=True,
|
|
169
|
-
)
|
|
170
|
-
|
|
171
|
-
@staticmethod
|
|
172
|
-
def GetIndexInfo(
|
|
173
|
-
request,
|
|
174
|
-
target,
|
|
175
|
-
options=(),
|
|
176
|
-
channel_credentials=None,
|
|
177
|
-
call_credentials=None,
|
|
178
|
-
insecure=False,
|
|
179
|
-
compression=None,
|
|
180
|
-
wait_for_ready=None,
|
|
181
|
-
timeout=None,
|
|
182
|
-
metadata=None,
|
|
183
|
-
):
|
|
184
|
-
return grpc.experimental.unary_unary(
|
|
185
|
-
request,
|
|
186
|
-
target,
|
|
187
|
-
"/hermes.SearchService/GetIndexInfo",
|
|
188
|
-
hermes__pb2.GetIndexInfoRequest.SerializeToString,
|
|
189
|
-
hermes__pb2.GetIndexInfoResponse.FromString,
|
|
190
|
-
options,
|
|
191
|
-
channel_credentials,
|
|
192
|
-
insecure,
|
|
193
|
-
call_credentials,
|
|
194
|
-
compression,
|
|
195
|
-
wait_for_ready,
|
|
196
|
-
timeout,
|
|
197
|
-
metadata,
|
|
198
|
-
_registered_method=True,
|
|
199
|
-
)
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
class IndexServiceStub:
|
|
203
|
-
"""Index service"""
|
|
204
|
-
|
|
205
|
-
def __init__(self, channel):
|
|
206
|
-
"""Constructor.
|
|
207
|
-
|
|
208
|
-
Args:
|
|
209
|
-
channel: A grpc.Channel.
|
|
210
|
-
"""
|
|
211
|
-
self.CreateIndex = channel.unary_unary(
|
|
212
|
-
"/hermes.IndexService/CreateIndex",
|
|
213
|
-
request_serializer=hermes__pb2.CreateIndexRequest.SerializeToString,
|
|
214
|
-
response_deserializer=hermes__pb2.CreateIndexResponse.FromString,
|
|
215
|
-
_registered_method=True,
|
|
216
|
-
)
|
|
217
|
-
self.IndexDocuments = channel.stream_unary(
|
|
218
|
-
"/hermes.IndexService/IndexDocuments",
|
|
219
|
-
request_serializer=hermes__pb2.IndexDocumentRequest.SerializeToString,
|
|
220
|
-
response_deserializer=hermes__pb2.IndexDocumentsResponse.FromString,
|
|
221
|
-
_registered_method=True,
|
|
222
|
-
)
|
|
223
|
-
self.BatchIndexDocuments = channel.unary_unary(
|
|
224
|
-
"/hermes.IndexService/BatchIndexDocuments",
|
|
225
|
-
request_serializer=hermes__pb2.BatchIndexDocumentsRequest.SerializeToString,
|
|
226
|
-
response_deserializer=hermes__pb2.BatchIndexDocumentsResponse.FromString,
|
|
227
|
-
_registered_method=True,
|
|
228
|
-
)
|
|
229
|
-
self.Commit = channel.unary_unary(
|
|
230
|
-
"/hermes.IndexService/Commit",
|
|
231
|
-
request_serializer=hermes__pb2.CommitRequest.SerializeToString,
|
|
232
|
-
response_deserializer=hermes__pb2.CommitResponse.FromString,
|
|
233
|
-
_registered_method=True,
|
|
234
|
-
)
|
|
235
|
-
self.ForceMerge = channel.unary_unary(
|
|
236
|
-
"/hermes.IndexService/ForceMerge",
|
|
237
|
-
request_serializer=hermes__pb2.ForceMergeRequest.SerializeToString,
|
|
238
|
-
response_deserializer=hermes__pb2.ForceMergeResponse.FromString,
|
|
239
|
-
_registered_method=True,
|
|
240
|
-
)
|
|
241
|
-
self.DeleteIndex = channel.unary_unary(
|
|
242
|
-
"/hermes.IndexService/DeleteIndex",
|
|
243
|
-
request_serializer=hermes__pb2.DeleteIndexRequest.SerializeToString,
|
|
244
|
-
response_deserializer=hermes__pb2.DeleteIndexResponse.FromString,
|
|
245
|
-
_registered_method=True,
|
|
246
|
-
)
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
class IndexServiceServicer:
|
|
250
|
-
"""Index service"""
|
|
251
|
-
|
|
252
|
-
def CreateIndex(self, request, context):
|
|
253
|
-
"""Create a new index (supports both structured schema and SDL string)"""
|
|
254
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
255
|
-
context.set_details("Method not implemented!")
|
|
256
|
-
raise NotImplementedError("Method not implemented!")
|
|
257
|
-
|
|
258
|
-
def IndexDocuments(self, request_iterator, context):
|
|
259
|
-
"""Add documents to index (streaming)"""
|
|
260
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
261
|
-
context.set_details("Method not implemented!")
|
|
262
|
-
raise NotImplementedError("Method not implemented!")
|
|
263
|
-
|
|
264
|
-
def BatchIndexDocuments(self, request, context):
|
|
265
|
-
"""Add documents in batch"""
|
|
266
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
267
|
-
context.set_details("Method not implemented!")
|
|
268
|
-
raise NotImplementedError("Method not implemented!")
|
|
269
|
-
|
|
270
|
-
def Commit(self, request, context):
|
|
271
|
-
"""Commit pending changes"""
|
|
272
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
273
|
-
context.set_details("Method not implemented!")
|
|
274
|
-
raise NotImplementedError("Method not implemented!")
|
|
275
|
-
|
|
276
|
-
def ForceMerge(self, request, context):
|
|
277
|
-
"""Force merge segments"""
|
|
278
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
279
|
-
context.set_details("Method not implemented!")
|
|
280
|
-
raise NotImplementedError("Method not implemented!")
|
|
281
|
-
|
|
282
|
-
def DeleteIndex(self, request, context):
|
|
283
|
-
"""Delete an index"""
|
|
284
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
285
|
-
context.set_details("Method not implemented!")
|
|
286
|
-
raise NotImplementedError("Method not implemented!")
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
def add_IndexServiceServicer_to_server(servicer, server):
|
|
290
|
-
rpc_method_handlers = {
|
|
291
|
-
"CreateIndex": grpc.unary_unary_rpc_method_handler(
|
|
292
|
-
servicer.CreateIndex,
|
|
293
|
-
request_deserializer=hermes__pb2.CreateIndexRequest.FromString,
|
|
294
|
-
response_serializer=hermes__pb2.CreateIndexResponse.SerializeToString,
|
|
295
|
-
),
|
|
296
|
-
"IndexDocuments": grpc.stream_unary_rpc_method_handler(
|
|
297
|
-
servicer.IndexDocuments,
|
|
298
|
-
request_deserializer=hermes__pb2.IndexDocumentRequest.FromString,
|
|
299
|
-
response_serializer=hermes__pb2.IndexDocumentsResponse.SerializeToString,
|
|
300
|
-
),
|
|
301
|
-
"BatchIndexDocuments": grpc.unary_unary_rpc_method_handler(
|
|
302
|
-
servicer.BatchIndexDocuments,
|
|
303
|
-
request_deserializer=hermes__pb2.BatchIndexDocumentsRequest.FromString,
|
|
304
|
-
response_serializer=hermes__pb2.BatchIndexDocumentsResponse.SerializeToString,
|
|
305
|
-
),
|
|
306
|
-
"Commit": grpc.unary_unary_rpc_method_handler(
|
|
307
|
-
servicer.Commit,
|
|
308
|
-
request_deserializer=hermes__pb2.CommitRequest.FromString,
|
|
309
|
-
response_serializer=hermes__pb2.CommitResponse.SerializeToString,
|
|
310
|
-
),
|
|
311
|
-
"ForceMerge": grpc.unary_unary_rpc_method_handler(
|
|
312
|
-
servicer.ForceMerge,
|
|
313
|
-
request_deserializer=hermes__pb2.ForceMergeRequest.FromString,
|
|
314
|
-
response_serializer=hermes__pb2.ForceMergeResponse.SerializeToString,
|
|
315
|
-
),
|
|
316
|
-
"DeleteIndex": grpc.unary_unary_rpc_method_handler(
|
|
317
|
-
servicer.DeleteIndex,
|
|
318
|
-
request_deserializer=hermes__pb2.DeleteIndexRequest.FromString,
|
|
319
|
-
response_serializer=hermes__pb2.DeleteIndexResponse.SerializeToString,
|
|
320
|
-
),
|
|
321
|
-
}
|
|
322
|
-
generic_handler = grpc.method_handlers_generic_handler(
|
|
323
|
-
"hermes.IndexService", rpc_method_handlers
|
|
324
|
-
)
|
|
325
|
-
server.add_generic_rpc_handlers((generic_handler,))
|
|
326
|
-
server.add_registered_method_handlers("hermes.IndexService", rpc_method_handlers)
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
# This class is part of an EXPERIMENTAL API.
|
|
330
|
-
class IndexService:
|
|
331
|
-
"""Index service"""
|
|
332
|
-
|
|
333
|
-
@staticmethod
|
|
334
|
-
def CreateIndex(
|
|
335
|
-
request,
|
|
336
|
-
target,
|
|
337
|
-
options=(),
|
|
338
|
-
channel_credentials=None,
|
|
339
|
-
call_credentials=None,
|
|
340
|
-
insecure=False,
|
|
341
|
-
compression=None,
|
|
342
|
-
wait_for_ready=None,
|
|
343
|
-
timeout=None,
|
|
344
|
-
metadata=None,
|
|
345
|
-
):
|
|
346
|
-
return grpc.experimental.unary_unary(
|
|
347
|
-
request,
|
|
348
|
-
target,
|
|
349
|
-
"/hermes.IndexService/CreateIndex",
|
|
350
|
-
hermes__pb2.CreateIndexRequest.SerializeToString,
|
|
351
|
-
hermes__pb2.CreateIndexResponse.FromString,
|
|
352
|
-
options,
|
|
353
|
-
channel_credentials,
|
|
354
|
-
insecure,
|
|
355
|
-
call_credentials,
|
|
356
|
-
compression,
|
|
357
|
-
wait_for_ready,
|
|
358
|
-
timeout,
|
|
359
|
-
metadata,
|
|
360
|
-
_registered_method=True,
|
|
361
|
-
)
|
|
362
|
-
|
|
363
|
-
@staticmethod
|
|
364
|
-
def IndexDocuments(
|
|
365
|
-
request_iterator,
|
|
366
|
-
target,
|
|
367
|
-
options=(),
|
|
368
|
-
channel_credentials=None,
|
|
369
|
-
call_credentials=None,
|
|
370
|
-
insecure=False,
|
|
371
|
-
compression=None,
|
|
372
|
-
wait_for_ready=None,
|
|
373
|
-
timeout=None,
|
|
374
|
-
metadata=None,
|
|
375
|
-
):
|
|
376
|
-
return grpc.experimental.stream_unary(
|
|
377
|
-
request_iterator,
|
|
378
|
-
target,
|
|
379
|
-
"/hermes.IndexService/IndexDocuments",
|
|
380
|
-
hermes__pb2.IndexDocumentRequest.SerializeToString,
|
|
381
|
-
hermes__pb2.IndexDocumentsResponse.FromString,
|
|
382
|
-
options,
|
|
383
|
-
channel_credentials,
|
|
384
|
-
insecure,
|
|
385
|
-
call_credentials,
|
|
386
|
-
compression,
|
|
387
|
-
wait_for_ready,
|
|
388
|
-
timeout,
|
|
389
|
-
metadata,
|
|
390
|
-
_registered_method=True,
|
|
391
|
-
)
|
|
392
|
-
|
|
393
|
-
@staticmethod
|
|
394
|
-
def BatchIndexDocuments(
|
|
395
|
-
request,
|
|
396
|
-
target,
|
|
397
|
-
options=(),
|
|
398
|
-
channel_credentials=None,
|
|
399
|
-
call_credentials=None,
|
|
400
|
-
insecure=False,
|
|
401
|
-
compression=None,
|
|
402
|
-
wait_for_ready=None,
|
|
403
|
-
timeout=None,
|
|
404
|
-
metadata=None,
|
|
405
|
-
):
|
|
406
|
-
return grpc.experimental.unary_unary(
|
|
407
|
-
request,
|
|
408
|
-
target,
|
|
409
|
-
"/hermes.IndexService/BatchIndexDocuments",
|
|
410
|
-
hermes__pb2.BatchIndexDocumentsRequest.SerializeToString,
|
|
411
|
-
hermes__pb2.BatchIndexDocumentsResponse.FromString,
|
|
412
|
-
options,
|
|
413
|
-
channel_credentials,
|
|
414
|
-
insecure,
|
|
415
|
-
call_credentials,
|
|
416
|
-
compression,
|
|
417
|
-
wait_for_ready,
|
|
418
|
-
timeout,
|
|
419
|
-
metadata,
|
|
420
|
-
_registered_method=True,
|
|
421
|
-
)
|
|
422
|
-
|
|
423
|
-
@staticmethod
|
|
424
|
-
def Commit(
|
|
425
|
-
request,
|
|
426
|
-
target,
|
|
427
|
-
options=(),
|
|
428
|
-
channel_credentials=None,
|
|
429
|
-
call_credentials=None,
|
|
430
|
-
insecure=False,
|
|
431
|
-
compression=None,
|
|
432
|
-
wait_for_ready=None,
|
|
433
|
-
timeout=None,
|
|
434
|
-
metadata=None,
|
|
435
|
-
):
|
|
436
|
-
return grpc.experimental.unary_unary(
|
|
437
|
-
request,
|
|
438
|
-
target,
|
|
439
|
-
"/hermes.IndexService/Commit",
|
|
440
|
-
hermes__pb2.CommitRequest.SerializeToString,
|
|
441
|
-
hermes__pb2.CommitResponse.FromString,
|
|
442
|
-
options,
|
|
443
|
-
channel_credentials,
|
|
444
|
-
insecure,
|
|
445
|
-
call_credentials,
|
|
446
|
-
compression,
|
|
447
|
-
wait_for_ready,
|
|
448
|
-
timeout,
|
|
449
|
-
metadata,
|
|
450
|
-
_registered_method=True,
|
|
451
|
-
)
|
|
452
|
-
|
|
453
|
-
@staticmethod
|
|
454
|
-
def ForceMerge(
|
|
455
|
-
request,
|
|
456
|
-
target,
|
|
457
|
-
options=(),
|
|
458
|
-
channel_credentials=None,
|
|
459
|
-
call_credentials=None,
|
|
460
|
-
insecure=False,
|
|
461
|
-
compression=None,
|
|
462
|
-
wait_for_ready=None,
|
|
463
|
-
timeout=None,
|
|
464
|
-
metadata=None,
|
|
465
|
-
):
|
|
466
|
-
return grpc.experimental.unary_unary(
|
|
467
|
-
request,
|
|
468
|
-
target,
|
|
469
|
-
"/hermes.IndexService/ForceMerge",
|
|
470
|
-
hermes__pb2.ForceMergeRequest.SerializeToString,
|
|
471
|
-
hermes__pb2.ForceMergeResponse.FromString,
|
|
472
|
-
options,
|
|
473
|
-
channel_credentials,
|
|
474
|
-
insecure,
|
|
475
|
-
call_credentials,
|
|
476
|
-
compression,
|
|
477
|
-
wait_for_ready,
|
|
478
|
-
timeout,
|
|
479
|
-
metadata,
|
|
480
|
-
_registered_method=True,
|
|
481
|
-
)
|
|
482
|
-
|
|
483
|
-
@staticmethod
|
|
484
|
-
def DeleteIndex(
|
|
485
|
-
request,
|
|
486
|
-
target,
|
|
487
|
-
options=(),
|
|
488
|
-
channel_credentials=None,
|
|
489
|
-
call_credentials=None,
|
|
490
|
-
insecure=False,
|
|
491
|
-
compression=None,
|
|
492
|
-
wait_for_ready=None,
|
|
493
|
-
timeout=None,
|
|
494
|
-
metadata=None,
|
|
495
|
-
):
|
|
496
|
-
return grpc.experimental.unary_unary(
|
|
497
|
-
request,
|
|
498
|
-
target,
|
|
499
|
-
"/hermes.IndexService/DeleteIndex",
|
|
500
|
-
hermes__pb2.DeleteIndexRequest.SerializeToString,
|
|
501
|
-
hermes__pb2.DeleteIndexResponse.FromString,
|
|
502
|
-
options,
|
|
503
|
-
channel_credentials,
|
|
504
|
-
insecure,
|
|
505
|
-
call_credentials,
|
|
506
|
-
compression,
|
|
507
|
-
wait_for_ready,
|
|
508
|
-
timeout,
|
|
509
|
-
metadata,
|
|
510
|
-
_registered_method=True,
|
|
511
|
-
)
|
|
File without changes
|
|
File without changes
|
{hermes_client_python-1.4.4 → hermes_client_python-1.4.5}/src/hermes_client_python/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|