hermes-client-python 1.4.5__tar.gz → 1.4.7__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.5 → hermes_client_python-1.4.7}/PKG-INFO +1 -1
- {hermes_client_python-1.4.5 → hermes_client_python-1.4.7}/pyproject.toml +1 -1
- {hermes_client_python-1.4.5 → hermes_client_python-1.4.7}/src/hermes_client_python/client.py +15 -1
- hermes_client_python-1.4.7/src/hermes_client_python/hermes_pb2.py +114 -0
- hermes_client_python-1.4.5/src/hermes_client_python/hermes_pb2.py +0 -114
- {hermes_client_python-1.4.5 → hermes_client_python-1.4.7}/.gitignore +0 -0
- {hermes_client_python-1.4.5 → hermes_client_python-1.4.7}/README.md +0 -0
- {hermes_client_python-1.4.5 → hermes_client_python-1.4.7}/src/hermes_client_python/__init__.py +0 -0
- {hermes_client_python-1.4.5 → hermes_client_python-1.4.7}/src/hermes_client_python/hermes_pb2_grpc.py +0 -0
- {hermes_client_python-1.4.5 → hermes_client_python-1.4.7}/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.7
|
|
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.5 → hermes_client_python-1.4.7}/src/hermes_client_python/client.py
RENAMED
|
@@ -243,6 +243,7 @@ class HermesClient:
|
|
|
243
243
|
term: tuple[str, str] | None = None,
|
|
244
244
|
boolean: dict[str, list[tuple[str, str]]] | None = None,
|
|
245
245
|
sparse_vector: tuple[str, list[int], list[float]] | None = None,
|
|
246
|
+
sparse_text: tuple[str, str] | None = None,
|
|
246
247
|
dense_vector: tuple[str, list[float]] | None = None,
|
|
247
248
|
nprobe: int = 0,
|
|
248
249
|
rerank_factor: int = 0,
|
|
@@ -257,6 +258,7 @@ class HermesClient:
|
|
|
257
258
|
term: Term query as (field, term) tuple
|
|
258
259
|
boolean: Boolean query with "must", "should", "must_not" keys
|
|
259
260
|
sparse_vector: Sparse vector query as (field, indices, values) tuple
|
|
261
|
+
sparse_text: Sparse vector query with server-side tokenization as (field, text) tuple
|
|
260
262
|
dense_vector: Dense vector query as (field, vector) tuple
|
|
261
263
|
nprobe: Number of clusters to probe for dense vector (IVF indexes)
|
|
262
264
|
rerank_factor: Re-ranking factor for dense vector search
|
|
@@ -277,12 +279,18 @@ class HermesClient:
|
|
|
277
279
|
"should": [("body", "world")],
|
|
278
280
|
})
|
|
279
281
|
|
|
280
|
-
# Sparse vector query
|
|
282
|
+
# Sparse vector query (pre-tokenized)
|
|
281
283
|
results = await client.search("docs",
|
|
282
284
|
sparse_vector=("embedding", [1, 5, 10], [0.5, 0.3, 0.2]),
|
|
283
285
|
fields_to_load=["title", "body"]
|
|
284
286
|
)
|
|
285
287
|
|
|
288
|
+
# Sparse text query (server-side tokenization)
|
|
289
|
+
results = await client.search("docs",
|
|
290
|
+
sparse_text=("embedding", "what is machine learning?"),
|
|
291
|
+
fields_to_load=["title", "body"]
|
|
292
|
+
)
|
|
293
|
+
|
|
286
294
|
# Dense vector query
|
|
287
295
|
results = await client.search("docs",
|
|
288
296
|
dense_vector=("embedding", [0.1, 0.2, 0.3, ...]),
|
|
@@ -295,6 +303,7 @@ class HermesClient:
|
|
|
295
303
|
term=term,
|
|
296
304
|
boolean=boolean,
|
|
297
305
|
sparse_vector=sparse_vector,
|
|
306
|
+
sparse_text=sparse_text,
|
|
298
307
|
dense_vector=dense_vector,
|
|
299
308
|
nprobe=nprobe,
|
|
300
309
|
rerank_factor=rerank_factor,
|
|
@@ -404,6 +413,7 @@ def _build_query(
|
|
|
404
413
|
term: tuple[str, str] | None = None,
|
|
405
414
|
boolean: dict[str, list[tuple[str, str]]] | None = None,
|
|
406
415
|
sparse_vector: tuple[str, list[int], list[float]] | None = None,
|
|
416
|
+
sparse_text: tuple[str, str] | None = None,
|
|
407
417
|
dense_vector: tuple[str, list[float]] | None = None,
|
|
408
418
|
nprobe: int = 0,
|
|
409
419
|
rerank_factor: int = 0,
|
|
@@ -438,6 +448,10 @@ def _build_query(
|
|
|
438
448
|
)
|
|
439
449
|
)
|
|
440
450
|
|
|
451
|
+
if sparse_text is not None:
|
|
452
|
+
field, text = sparse_text
|
|
453
|
+
return pb.Query(sparse_vector=pb.SparseVectorQuery(field=field, text=text))
|
|
454
|
+
|
|
441
455
|
if dense_vector is not None:
|
|
442
456
|
field, vector = dense_vector
|
|
443
457
|
return pb.Query(
|
|
@@ -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\"Q\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\x12\x0c\n\x04text\x18\x04 \x01(\t\"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=372
|
|
46
|
+
_globals['_DENSEVECTORQUERY']._serialized_start=374
|
|
47
|
+
_globals['_DENSEVECTORQUERY']._serialized_end=462
|
|
48
|
+
_globals['_TERMQUERY']._serialized_start=464
|
|
49
|
+
_globals['_TERMQUERY']._serialized_end=504
|
|
50
|
+
_globals['_BOOLEANQUERY']._serialized_start=506
|
|
51
|
+
_globals['_BOOLEANQUERY']._serialized_end=613
|
|
52
|
+
_globals['_BOOSTQUERY']._serialized_start=615
|
|
53
|
+
_globals['_BOOSTQUERY']._serialized_end=672
|
|
54
|
+
_globals['_ALLQUERY']._serialized_start=674
|
|
55
|
+
_globals['_ALLQUERY']._serialized_end=684
|
|
56
|
+
_globals['_SEARCHREQUEST']._serialized_start=686
|
|
57
|
+
_globals['_SEARCHREQUEST']._serialized_end=806
|
|
58
|
+
_globals['_SEARCHHIT']._serialized_start=809
|
|
59
|
+
_globals['_SEARCHHIT']._serialized_end=965
|
|
60
|
+
_globals['_SEARCHHIT_FIELDSENTRY']._serialized_start=900
|
|
61
|
+
_globals['_SEARCHHIT_FIELDSENTRY']._serialized_end=965
|
|
62
|
+
_globals['_FIELDVALUE']._serialized_start=968
|
|
63
|
+
_globals['_FIELDVALUE']._serialized_end=1187
|
|
64
|
+
_globals['_SPARSEVECTOR']._serialized_start=1189
|
|
65
|
+
_globals['_SPARSEVECTOR']._serialized_end=1236
|
|
66
|
+
_globals['_DENSEVECTOR']._serialized_start=1238
|
|
67
|
+
_globals['_DENSEVECTOR']._serialized_end=1267
|
|
68
|
+
_globals['_SEARCHRESPONSE']._serialized_start=1269
|
|
69
|
+
_globals['_SEARCHRESPONSE']._serialized_end=1355
|
|
70
|
+
_globals['_GETDOCUMENTREQUEST']._serialized_start=1357
|
|
71
|
+
_globals['_GETDOCUMENTREQUEST']._serialized_end=1413
|
|
72
|
+
_globals['_GETDOCUMENTRESPONSE']._serialized_start=1416
|
|
73
|
+
_globals['_GETDOCUMENTRESPONSE']._serialized_end=1561
|
|
74
|
+
_globals['_GETDOCUMENTRESPONSE_FIELDSENTRY']._serialized_start=900
|
|
75
|
+
_globals['_GETDOCUMENTRESPONSE_FIELDSENTRY']._serialized_end=965
|
|
76
|
+
_globals['_GETINDEXINFOREQUEST']._serialized_start=1563
|
|
77
|
+
_globals['_GETINDEXINFOREQUEST']._serialized_end=1604
|
|
78
|
+
_globals['_GETINDEXINFORESPONSE']._serialized_start=1606
|
|
79
|
+
_globals['_GETINDEXINFORESPONSE']._serialized_end=1704
|
|
80
|
+
_globals['_CREATEINDEXREQUEST']._serialized_start=1706
|
|
81
|
+
_globals['_CREATEINDEXREQUEST']._serialized_end=1762
|
|
82
|
+
_globals['_CREATEINDEXRESPONSE']._serialized_start=1764
|
|
83
|
+
_globals['_CREATEINDEXRESPONSE']._serialized_end=1802
|
|
84
|
+
_globals['_NAMEDDOCUMENT']._serialized_start=1805
|
|
85
|
+
_globals['_NAMEDDOCUMENT']._serialized_end=1938
|
|
86
|
+
_globals['_NAMEDDOCUMENT_FIELDSENTRY']._serialized_start=900
|
|
87
|
+
_globals['_NAMEDDOCUMENT_FIELDSENTRY']._serialized_end=965
|
|
88
|
+
_globals['_BATCHINDEXDOCUMENTSREQUEST']._serialized_start=1940
|
|
89
|
+
_globals['_BATCHINDEXDOCUMENTSREQUEST']._serialized_end=2030
|
|
90
|
+
_globals['_BATCHINDEXDOCUMENTSRESPONSE']._serialized_start=2032
|
|
91
|
+
_globals['_BATCHINDEXDOCUMENTSRESPONSE']._serialized_end=2105
|
|
92
|
+
_globals['_INDEXDOCUMENTREQUEST']._serialized_start=2108
|
|
93
|
+
_globals['_INDEXDOCUMENTREQUEST']._serialized_end=2275
|
|
94
|
+
_globals['_INDEXDOCUMENTREQUEST_FIELDSENTRY']._serialized_start=900
|
|
95
|
+
_globals['_INDEXDOCUMENTREQUEST_FIELDSENTRY']._serialized_end=965
|
|
96
|
+
_globals['_INDEXDOCUMENTSRESPONSE']._serialized_start=2277
|
|
97
|
+
_globals['_INDEXDOCUMENTSRESPONSE']._serialized_end=2324
|
|
98
|
+
_globals['_COMMITREQUEST']._serialized_start=2326
|
|
99
|
+
_globals['_COMMITREQUEST']._serialized_end=2361
|
|
100
|
+
_globals['_COMMITRESPONSE']._serialized_start=2363
|
|
101
|
+
_globals['_COMMITRESPONSE']._serialized_end=2414
|
|
102
|
+
_globals['_FORCEMERGEREQUEST']._serialized_start=2416
|
|
103
|
+
_globals['_FORCEMERGEREQUEST']._serialized_end=2455
|
|
104
|
+
_globals['_FORCEMERGERESPONSE']._serialized_start=2457
|
|
105
|
+
_globals['_FORCEMERGERESPONSE']._serialized_end=2516
|
|
106
|
+
_globals['_DELETEINDEXREQUEST']._serialized_start=2518
|
|
107
|
+
_globals['_DELETEINDEXREQUEST']._serialized_end=2558
|
|
108
|
+
_globals['_DELETEINDEXRESPONSE']._serialized_start=2560
|
|
109
|
+
_globals['_DELETEINDEXRESPONSE']._serialized_end=2598
|
|
110
|
+
_globals['_SEARCHSERVICE']._serialized_start=2601
|
|
111
|
+
_globals['_SEARCHSERVICE']._serialized_end=2820
|
|
112
|
+
_globals['_INDEXSERVICE']._serialized_start=2823
|
|
113
|
+
_globals['_INDEXSERVICE']._serialized_end=3285
|
|
114
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -1,114 +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\"\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)
|
|
File without changes
|
|
File without changes
|
{hermes_client_python-1.4.5 → hermes_client_python-1.4.7}/src/hermes_client_python/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|