hermes-client-python 1.8.0__tar.gz → 1.8.2__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.0 → hermes_client_python-1.8.2}/PKG-INFO +1 -1
- {hermes_client_python-1.8.0 → hermes_client_python-1.8.2}/pyproject.toml +1 -1
- {hermes_client_python-1.8.0 → hermes_client_python-1.8.2}/src/hermes_client_python/client.py +18 -0
- {hermes_client_python-1.8.0 → hermes_client_python-1.8.2}/src/hermes_client_python/hermes_pb2.py +11 -7
- {hermes_client_python-1.8.0 → hermes_client_python-1.8.2}/src/hermes_client_python/hermes_pb2_grpc.py +44 -0
- {hermes_client_python-1.8.0 → hermes_client_python-1.8.2}/.gitignore +0 -0
- {hermes_client_python-1.8.0 → hermes_client_python-1.8.2}/README.md +0 -0
- {hermes_client_python-1.8.0 → hermes_client_python-1.8.2}/src/hermes_client_python/__init__.py +0 -0
- {hermes_client_python-1.8.0 → hermes_client_python-1.8.2}/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.8.
|
|
3
|
+
Version: 1.8.2
|
|
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.8.0 → hermes_client_python-1.8.2}/src/hermes_client_python/client.py
RENAMED
|
@@ -283,6 +283,24 @@ class HermesClient:
|
|
|
283
283
|
response = await self._index_stub.ForceMerge(request)
|
|
284
284
|
return response.num_segments
|
|
285
285
|
|
|
286
|
+
async def reorder(self, index_name: str) -> int:
|
|
287
|
+
"""Reorder BMP blocks by SimHash similarity for better pruning.
|
|
288
|
+
|
|
289
|
+
Performs record-level reordering: shuffles individual ordinals across
|
|
290
|
+
blocks so that ordinals with similar SimHash cluster tightly. This
|
|
291
|
+
improves block-max pruning effectiveness for BMP sparse vector queries.
|
|
292
|
+
|
|
293
|
+
Args:
|
|
294
|
+
index_name: Name of the index
|
|
295
|
+
|
|
296
|
+
Returns:
|
|
297
|
+
Number of segments after reorder
|
|
298
|
+
"""
|
|
299
|
+
self._ensure_connected()
|
|
300
|
+
request = pb.ReorderRequest(index_name=index_name)
|
|
301
|
+
response = await self._index_stub.Reorder(request)
|
|
302
|
+
return response.num_segments
|
|
303
|
+
|
|
286
304
|
async def retrain_vector_index(self, index_name: str) -> bool:
|
|
287
305
|
"""Retrain vector index centroids/codebooks from current data.
|
|
288
306
|
|
{hermes_client_python-1.8.0 → hermes_client_python-1.8.2}/src/hermes_client_python/hermes_pb2.py
RENAMED
|
@@ -24,7 +24,7 @@ _sym_db = _symbol_database.Default()
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0chermes.proto\x12\x06hermes\"\xd2\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\x12#\n\x05match\x18\x07 \x01(\x0b\x32\x12.hermes.MatchQueryH\x00\x12#\n\x05range\x18\x08 \x01(\x0b\x32\x12.hermes.RangeQueryH\x00\x42\x07\n\x05query\"\xa5\x02\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\x12,\n\x08\x63ombiner\x18\x05 \x01(\x0e\x32\x1a.hermes.MultiValueCombiner\x12\x13\n\x0bheap_factor\x18\x06 \x01(\x02\x12\x1c\n\x14\x63ombiner_temperature\x18\x07 \x01(\x02\x12\x16\n\x0e\x63ombiner_top_k\x18\x08 \x01(\r\x12\x16\n\x0e\x63ombiner_decay\x18\t \x01(\x02\x12\x18\n\x10weight_threshold\x18\n \x01(\x02\x12\x16\n\x0emax_query_dims\x18\x0b \x01(\r\x12\x0f\n\x07pruning\x18\x0c \x01(\x02\"\xd4\x01\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(\x02\x12,\n\x08\x63ombiner\x18\x05 \x01(\x0e\x32\x1a.hermes.MultiValueCombiner\x12\x1c\n\x14\x63ombiner_temperature\x18\x06 \x01(\x02\x12\x16\n\x0e\x63ombiner_top_k\x18\x07 \x01(\r\x12\x16\n\x0e\x63ombiner_decay\x18\x08 \x01(\x02\"(\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\"\xe7\x01\n\nRangeQuery\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x14\n\x07min_u64\x18\x02 \x01(\x04H\x00\x88\x01\x01\x12\x14\n\x07max_u64\x18\x03 \x01(\x04H\x01\x88\x01\x01\x12\x14\n\x07min_i64\x18\x04 \x01(\x03H\x02\x88\x01\x01\x12\x14\n\x07max_i64\x18\x05 \x01(\x03H\x03\x88\x01\x01\x12\x14\n\x07min_f64\x18\x06 \x01(\x01H\x04\x88\x01\x01\x12\x14\n\x07max_f64\x18\x07 \x01(\x01H\x05\x88\x01\x01\x42\n\n\x08_min_u64B\n\n\x08_max_u64B\n\n\x08_min_i64B\n\n\x08_max_i64B\n\n\x08_min_f64B\n\n\x08_max_f64\")\n\nMatchQuery\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04text\x18\x02 \x01(\t\"\xcd\x01\n\x08Reranker\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0e\n\x06vector\x18\x02 \x03(\x02\x12\r\n\x05limit\x18\x03 \x01(\r\x12,\n\x08\x63ombiner\x18\x04 \x01(\x0e\x32\x1a.hermes.MultiValueCombiner\x12\x1c\n\x14\x63ombiner_temperature\x18\x05 \x01(\x02\x12\x16\n\x0e\x63ombiner_top_k\x18\x06 \x01(\r\x12\x16\n\x0e\x63ombiner_decay\x18\x07 \x01(\x02\x12\x17\n\x0fmatryoshka_dims\x18\x08 \x01(\r\"\x9c\x01\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\x12\"\n\x08reranker\x18\x06 \x01(\x0b\x32\x10.hermes.Reranker\"0\n\nDocAddress\x12\x12\n\nsegment_id\x18\x01 \x01(\t\x12\x0e\n\x06\x64oc_id\x18\x02 \x01(\r\"\xe3\x01\n\tSearchHit\x12#\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0b\x32\x12.hermes.DocAddress\x12\r\n\x05score\x18\x02 \x01(\x02\x12-\n\x06\x66ields\x18\x03 \x03(\x0b\x32\x1d.hermes.SearchHit.FieldsEntry\x12,\n\x0eordinal_scores\x18\x04 \x03(\x0b\x32\x14.hermes.OrdinalScore\x1a\x45\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.hermes.FieldValueList:\x02\x38\x01\"4\n\x0e\x46ieldValueList\x12\"\n\x06values\x18\x01 \x03(\x0b\x32\x12.hermes.FieldValue\".\n\x0cOrdinalScore\x12\x0f\n\x07ordinal\x18\x01 \x01(\r\x12\r\n\x05score\x18\x02 \x01(\x02\"\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\"~\n\x0eSearchResponse\x12\x1f\n\x04hits\x18\x01 \x03(\x0b\x32\x11.hermes.SearchHit\x12\x12\n\ntotal_hits\x18\x02 \x01(\x04\x12\x0f\n\x07took_ms\x18\x03 \x01(\x04\x12&\n\x07timings\x18\x04 \x01(\x0b\x32\x15.hermes.SearchTimings\"X\n\rSearchTimings\x12\x11\n\tsearch_us\x18\x01 \x01(\x04\x12\x11\n\trerank_us\x18\x02 \x01(\x04\x12\x0f\n\x07load_us\x18\x03 \x01(\x04\x12\x10\n\x08total_us\x18\x04 \x01(\x04\"M\n\x12GetDocumentRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12#\n\x07\x61\x64\x64ress\x18\x02 \x01(\x0b\x32\x12.hermes.DocAddress\"\x95\x01\n\x13GetDocumentResponse\x12\x37\n\x06\x66ields\x18\x01 \x03(\x0b\x32\'.hermes.GetDocumentResponse.FieldsEntry\x1a\x45\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.hermes.FieldValueList:\x02\x38\x01\")\n\x13GetIndexInfoRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\"\xbd\x01\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\x12)\n\x0cmemory_stats\x18\x05 \x01(\x0b\x32\x13.hermes.MemoryStats\x12.\n\x0cvector_stats\x18\x06 \x03(\x0b\x32\x18.hermes.VectorFieldStats\"e\n\x10VectorFieldStats\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12\x13\n\x0bvector_type\x18\x02 \x01(\t\x12\x15\n\rtotal_vectors\x18\x03 \x01(\x04\x12\x11\n\tdimension\x18\x04 \x01(\r\"\x8c\x01\n\x0bMemoryStats\x12\x13\n\x0btotal_bytes\x18\x01 \x01(\x04\x12\x34\n\x0findexing_buffer\x18\x02 \x01(\x0b\x32\x1b.hermes.IndexingBufferStats\x12\x32\n\x0esegment_reader\x18\x03 \x01(\x0b\x32\x1a.hermes.SegmentReaderStats\"\xdf\x01\n\x13IndexingBufferStats\x12\x13\n\x0btotal_bytes\x18\x01 \x01(\x04\x12\x16\n\x0epostings_bytes\x18\x02 \x01(\x04\x12\x1c\n\x14sparse_vectors_bytes\x18\x03 \x01(\x04\x12\x1b\n\x13\x64\x65nse_vectors_bytes\x18\x04 \x01(\x04\x12\x16\n\x0einterner_bytes\x18\x05 \x01(\x04\x12\x1c\n\x14position_index_bytes\x18\x06 \x01(\x04\x12\x14\n\x0cpending_docs\x18\x07 \x01(\r\x12\x14\n\x0cunique_terms\x18\x08 \x01(\r\"\xb7\x01\n\x12SegmentReaderStats\x12\x13\n\x0btotal_bytes\x18\x01 \x01(\x04\x12\x1d\n\x15term_dict_cache_bytes\x18\x02 \x01(\x04\x12\x19\n\x11store_cache_bytes\x18\x03 \x01(\x04\x12\x1a\n\x12sparse_index_bytes\x18\x04 \x01(\x04\x12\x19\n\x11\x64\x65nse_index_bytes\x18\x05 \x01(\x04\x12\x1b\n\x13num_segments_loaded\x18\x06 \x01(\r\"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\"=\n\nFieldEntry\x12\x0c\n\x04name\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.hermes.FieldValue\"3\n\rNamedDocument\x12\"\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x12.hermes.FieldEntry\"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\"p\n\x1b\x42\x61tchIndexDocumentsResponse\x12\x15\n\rindexed_count\x18\x01 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\x02 \x01(\r\x12%\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x15.hermes.DocumentError\"-\n\rDocumentError\x12\r\n\x05index\x18\x01 \x01(\r\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"N\n\x14IndexDocumentRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\"\n\x06\x66ields\x18\x02 \x03(\x0b\x32\x12.hermes.FieldEntry\"V\n\x16IndexDocumentsResponse\x12\x15\n\rindexed_count\x18\x01 \x01(\r\x12%\n\x06\x65rrors\x18\x02 \x03(\x0b\x32\x15.hermes.DocumentError\"#\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\"\x14\n\x12ListIndexesRequest\"*\n\x13ListIndexesResponse\x12\x13\n\x0bindex_names\x18\x01 \x03(\t\"/\n\x19RetrainVectorIndexRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\"-\n\x1aRetrainVectorIndexResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08*\x81\x01\n\x12MultiValueCombiner\x12\x18\n\x14\x43OMBINER_LOG_SUM_EXP\x10\x00\x12\x10\n\x0c\x43OMBINER_MAX\x10\x01\x12\x10\n\x0c\x43OMBINER_AVG\x10\x02\x12\x10\n\x0c\x43OMBINER_SUM\x10\x03\x12\x1b\n\x17\x43OMBINER_WEIGHTED_TOP_K\x10\x04\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\xf3\x04\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.DeleteIndexResponse\x12\x46\n\x0bListIndexes\x12\x1a.hermes.ListIndexesRequest\x1a\x1b.hermes.ListIndexesResponse\x12[\n\x12RetrainVectorIndex\x12!.hermes.RetrainVectorIndexRequest\x1a\".hermes.RetrainVectorIndexResponseb\x06proto3')
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0chermes.proto\x12\x06hermes\"\xd2\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\x12#\n\x05match\x18\x07 \x01(\x0b\x32\x12.hermes.MatchQueryH\x00\x12#\n\x05range\x18\x08 \x01(\x0b\x32\x12.hermes.RangeQueryH\x00\x42\x07\n\x05query\"\xa5\x02\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\x12,\n\x08\x63ombiner\x18\x05 \x01(\x0e\x32\x1a.hermes.MultiValueCombiner\x12\x13\n\x0bheap_factor\x18\x06 \x01(\x02\x12\x1c\n\x14\x63ombiner_temperature\x18\x07 \x01(\x02\x12\x16\n\x0e\x63ombiner_top_k\x18\x08 \x01(\r\x12\x16\n\x0e\x63ombiner_decay\x18\t \x01(\x02\x12\x18\n\x10weight_threshold\x18\n \x01(\x02\x12\x16\n\x0emax_query_dims\x18\x0b \x01(\r\x12\x0f\n\x07pruning\x18\x0c \x01(\x02\"\xd4\x01\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(\x02\x12,\n\x08\x63ombiner\x18\x05 \x01(\x0e\x32\x1a.hermes.MultiValueCombiner\x12\x1c\n\x14\x63ombiner_temperature\x18\x06 \x01(\x02\x12\x16\n\x0e\x63ombiner_top_k\x18\x07 \x01(\r\x12\x16\n\x0e\x63ombiner_decay\x18\x08 \x01(\x02\"(\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\"\xe7\x01\n\nRangeQuery\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x14\n\x07min_u64\x18\x02 \x01(\x04H\x00\x88\x01\x01\x12\x14\n\x07max_u64\x18\x03 \x01(\x04H\x01\x88\x01\x01\x12\x14\n\x07min_i64\x18\x04 \x01(\x03H\x02\x88\x01\x01\x12\x14\n\x07max_i64\x18\x05 \x01(\x03H\x03\x88\x01\x01\x12\x14\n\x07min_f64\x18\x06 \x01(\x01H\x04\x88\x01\x01\x12\x14\n\x07max_f64\x18\x07 \x01(\x01H\x05\x88\x01\x01\x42\n\n\x08_min_u64B\n\n\x08_max_u64B\n\n\x08_min_i64B\n\n\x08_max_i64B\n\n\x08_min_f64B\n\n\x08_max_f64\")\n\nMatchQuery\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04text\x18\x02 \x01(\t\"\xcd\x01\n\x08Reranker\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0e\n\x06vector\x18\x02 \x03(\x02\x12\r\n\x05limit\x18\x03 \x01(\r\x12,\n\x08\x63ombiner\x18\x04 \x01(\x0e\x32\x1a.hermes.MultiValueCombiner\x12\x1c\n\x14\x63ombiner_temperature\x18\x05 \x01(\x02\x12\x16\n\x0e\x63ombiner_top_k\x18\x06 \x01(\r\x12\x16\n\x0e\x63ombiner_decay\x18\x07 \x01(\x02\x12\x17\n\x0fmatryoshka_dims\x18\x08 \x01(\r\"\x9c\x01\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\x12\"\n\x08reranker\x18\x06 \x01(\x0b\x32\x10.hermes.Reranker\"0\n\nDocAddress\x12\x12\n\nsegment_id\x18\x01 \x01(\t\x12\x0e\n\x06\x64oc_id\x18\x02 \x01(\r\"\xe3\x01\n\tSearchHit\x12#\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0b\x32\x12.hermes.DocAddress\x12\r\n\x05score\x18\x02 \x01(\x02\x12-\n\x06\x66ields\x18\x03 \x03(\x0b\x32\x1d.hermes.SearchHit.FieldsEntry\x12,\n\x0eordinal_scores\x18\x04 \x03(\x0b\x32\x14.hermes.OrdinalScore\x1a\x45\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.hermes.FieldValueList:\x02\x38\x01\"4\n\x0e\x46ieldValueList\x12\"\n\x06values\x18\x01 \x03(\x0b\x32\x12.hermes.FieldValue\".\n\x0cOrdinalScore\x12\x0f\n\x07ordinal\x18\x01 \x01(\r\x12\r\n\x05score\x18\x02 \x01(\x02\"\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\"~\n\x0eSearchResponse\x12\x1f\n\x04hits\x18\x01 \x03(\x0b\x32\x11.hermes.SearchHit\x12\x12\n\ntotal_hits\x18\x02 \x01(\x04\x12\x0f\n\x07took_ms\x18\x03 \x01(\x04\x12&\n\x07timings\x18\x04 \x01(\x0b\x32\x15.hermes.SearchTimings\"X\n\rSearchTimings\x12\x11\n\tsearch_us\x18\x01 \x01(\x04\x12\x11\n\trerank_us\x18\x02 \x01(\x04\x12\x0f\n\x07load_us\x18\x03 \x01(\x04\x12\x10\n\x08total_us\x18\x04 \x01(\x04\"M\n\x12GetDocumentRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12#\n\x07\x61\x64\x64ress\x18\x02 \x01(\x0b\x32\x12.hermes.DocAddress\"\x95\x01\n\x13GetDocumentResponse\x12\x37\n\x06\x66ields\x18\x01 \x03(\x0b\x32\'.hermes.GetDocumentResponse.FieldsEntry\x1a\x45\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.hermes.FieldValueList:\x02\x38\x01\")\n\x13GetIndexInfoRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\"\xbd\x01\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\x12)\n\x0cmemory_stats\x18\x05 \x01(\x0b\x32\x13.hermes.MemoryStats\x12.\n\x0cvector_stats\x18\x06 \x03(\x0b\x32\x18.hermes.VectorFieldStats\"e\n\x10VectorFieldStats\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12\x13\n\x0bvector_type\x18\x02 \x01(\t\x12\x15\n\rtotal_vectors\x18\x03 \x01(\x04\x12\x11\n\tdimension\x18\x04 \x01(\r\"\x8c\x01\n\x0bMemoryStats\x12\x13\n\x0btotal_bytes\x18\x01 \x01(\x04\x12\x34\n\x0findexing_buffer\x18\x02 \x01(\x0b\x32\x1b.hermes.IndexingBufferStats\x12\x32\n\x0esegment_reader\x18\x03 \x01(\x0b\x32\x1a.hermes.SegmentReaderStats\"\xdf\x01\n\x13IndexingBufferStats\x12\x13\n\x0btotal_bytes\x18\x01 \x01(\x04\x12\x16\n\x0epostings_bytes\x18\x02 \x01(\x04\x12\x1c\n\x14sparse_vectors_bytes\x18\x03 \x01(\x04\x12\x1b\n\x13\x64\x65nse_vectors_bytes\x18\x04 \x01(\x04\x12\x16\n\x0einterner_bytes\x18\x05 \x01(\x04\x12\x1c\n\x14position_index_bytes\x18\x06 \x01(\x04\x12\x14\n\x0cpending_docs\x18\x07 \x01(\r\x12\x14\n\x0cunique_terms\x18\x08 \x01(\r\"\xb7\x01\n\x12SegmentReaderStats\x12\x13\n\x0btotal_bytes\x18\x01 \x01(\x04\x12\x1d\n\x15term_dict_cache_bytes\x18\x02 \x01(\x04\x12\x19\n\x11store_cache_bytes\x18\x03 \x01(\x04\x12\x1a\n\x12sparse_index_bytes\x18\x04 \x01(\x04\x12\x19\n\x11\x64\x65nse_index_bytes\x18\x05 \x01(\x04\x12\x1b\n\x13num_segments_loaded\x18\x06 \x01(\r\"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\"=\n\nFieldEntry\x12\x0c\n\x04name\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.hermes.FieldValue\"3\n\rNamedDocument\x12\"\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x12.hermes.FieldEntry\"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\"p\n\x1b\x42\x61tchIndexDocumentsResponse\x12\x15\n\rindexed_count\x18\x01 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\x02 \x01(\r\x12%\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x15.hermes.DocumentError\"-\n\rDocumentError\x12\r\n\x05index\x18\x01 \x01(\r\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"N\n\x14IndexDocumentRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\"\n\x06\x66ields\x18\x02 \x03(\x0b\x32\x12.hermes.FieldEntry\"V\n\x16IndexDocumentsResponse\x12\x15\n\rindexed_count\x18\x01 \x01(\r\x12%\n\x06\x65rrors\x18\x02 \x03(\x0b\x32\x15.hermes.DocumentError\"#\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\"\x14\n\x12ListIndexesRequest\"*\n\x13ListIndexesResponse\x12\x13\n\x0bindex_names\x18\x01 \x03(\t\"/\n\x19RetrainVectorIndexRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\"-\n\x1aRetrainVectorIndexResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"$\n\x0eReorderRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\"8\n\x0fReorderResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x14\n\x0cnum_segments\x18\x02 \x01(\r*\x81\x01\n\x12MultiValueCombiner\x12\x18\n\x14\x43OMBINER_LOG_SUM_EXP\x10\x00\x12\x10\n\x0c\x43OMBINER_MAX\x10\x01\x12\x10\n\x0c\x43OMBINER_AVG\x10\x02\x12\x10\n\x0c\x43OMBINER_SUM\x10\x03\x12\x1b\n\x17\x43OMBINER_WEIGHTED_TOP_K\x10\x04\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\xaf\x05\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:\n\x07Reorder\x12\x16.hermes.ReorderRequest\x1a\x17.hermes.ReorderResponse\x12\x46\n\x0b\x44\x65leteIndex\x12\x1a.hermes.DeleteIndexRequest\x1a\x1b.hermes.DeleteIndexResponse\x12\x46\n\x0bListIndexes\x12\x1a.hermes.ListIndexesRequest\x1a\x1b.hermes.ListIndexesResponse\x12[\n\x12RetrainVectorIndex\x12!.hermes.RetrainVectorIndexRequest\x1a\".hermes.RetrainVectorIndexResponseb\x06proto3')
|
|
28
28
|
|
|
29
29
|
_globals = globals()
|
|
30
30
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -35,8 +35,8 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
35
35
|
_globals['_SEARCHHIT_FIELDSENTRY']._serialized_options = b'8\001'
|
|
36
36
|
_globals['_GETDOCUMENTRESPONSE_FIELDSENTRY']._loaded_options = None
|
|
37
37
|
_globals['_GETDOCUMENTRESPONSE_FIELDSENTRY']._serialized_options = b'8\001'
|
|
38
|
-
_globals['_MULTIVALUECOMBINER']._serialized_start=
|
|
39
|
-
_globals['_MULTIVALUECOMBINER']._serialized_end=
|
|
38
|
+
_globals['_MULTIVALUECOMBINER']._serialized_start=4936
|
|
39
|
+
_globals['_MULTIVALUECOMBINER']._serialized_end=5065
|
|
40
40
|
_globals['_QUERY']._serialized_start=25
|
|
41
41
|
_globals['_QUERY']._serialized_end=363
|
|
42
42
|
_globals['_SPARSEVECTORQUERY']._serialized_start=366
|
|
@@ -135,8 +135,12 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
135
135
|
_globals['_RETRAINVECTORINDEXREQUEST']._serialized_end=4790
|
|
136
136
|
_globals['_RETRAINVECTORINDEXRESPONSE']._serialized_start=4792
|
|
137
137
|
_globals['_RETRAINVECTORINDEXRESPONSE']._serialized_end=4837
|
|
138
|
-
_globals['
|
|
139
|
-
_globals['
|
|
140
|
-
_globals['
|
|
141
|
-
_globals['
|
|
138
|
+
_globals['_REORDERREQUEST']._serialized_start=4839
|
|
139
|
+
_globals['_REORDERREQUEST']._serialized_end=4875
|
|
140
|
+
_globals['_REORDERRESPONSE']._serialized_start=4877
|
|
141
|
+
_globals['_REORDERRESPONSE']._serialized_end=4933
|
|
142
|
+
_globals['_SEARCHSERVICE']._serialized_start=5068
|
|
143
|
+
_globals['_SEARCHSERVICE']._serialized_end=5287
|
|
144
|
+
_globals['_INDEXSERVICE']._serialized_start=5290
|
|
145
|
+
_globals['_INDEXSERVICE']._serialized_end=5977
|
|
142
146
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -224,6 +224,11 @@ class IndexServiceStub(object):
|
|
|
224
224
|
request_serializer=hermes__pb2.ForceMergeRequest.SerializeToString,
|
|
225
225
|
response_deserializer=hermes__pb2.ForceMergeResponse.FromString,
|
|
226
226
|
_registered_method=True)
|
|
227
|
+
self.Reorder = channel.unary_unary(
|
|
228
|
+
'/hermes.IndexService/Reorder',
|
|
229
|
+
request_serializer=hermes__pb2.ReorderRequest.SerializeToString,
|
|
230
|
+
response_deserializer=hermes__pb2.ReorderResponse.FromString,
|
|
231
|
+
_registered_method=True)
|
|
227
232
|
self.DeleteIndex = channel.unary_unary(
|
|
228
233
|
'/hermes.IndexService/DeleteIndex',
|
|
229
234
|
request_serializer=hermes__pb2.DeleteIndexRequest.SerializeToString,
|
|
@@ -280,6 +285,13 @@ class IndexServiceServicer(object):
|
|
|
280
285
|
context.set_details('Method not implemented!')
|
|
281
286
|
raise NotImplementedError('Method not implemented!')
|
|
282
287
|
|
|
288
|
+
def Reorder(self, request, context):
|
|
289
|
+
"""Reorder BMP blocks by SimHash similarity
|
|
290
|
+
"""
|
|
291
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
292
|
+
context.set_details('Method not implemented!')
|
|
293
|
+
raise NotImplementedError('Method not implemented!')
|
|
294
|
+
|
|
283
295
|
def DeleteIndex(self, request, context):
|
|
284
296
|
"""Delete an index
|
|
285
297
|
"""
|
|
@@ -329,6 +341,11 @@ def add_IndexServiceServicer_to_server(servicer, server):
|
|
|
329
341
|
request_deserializer=hermes__pb2.ForceMergeRequest.FromString,
|
|
330
342
|
response_serializer=hermes__pb2.ForceMergeResponse.SerializeToString,
|
|
331
343
|
),
|
|
344
|
+
'Reorder': grpc.unary_unary_rpc_method_handler(
|
|
345
|
+
servicer.Reorder,
|
|
346
|
+
request_deserializer=hermes__pb2.ReorderRequest.FromString,
|
|
347
|
+
response_serializer=hermes__pb2.ReorderResponse.SerializeToString,
|
|
348
|
+
),
|
|
332
349
|
'DeleteIndex': grpc.unary_unary_rpc_method_handler(
|
|
333
350
|
servicer.DeleteIndex,
|
|
334
351
|
request_deserializer=hermes__pb2.DeleteIndexRequest.FromString,
|
|
@@ -491,6 +508,33 @@ class IndexService(object):
|
|
|
491
508
|
metadata,
|
|
492
509
|
_registered_method=True)
|
|
493
510
|
|
|
511
|
+
@staticmethod
|
|
512
|
+
def Reorder(request,
|
|
513
|
+
target,
|
|
514
|
+
options=(),
|
|
515
|
+
channel_credentials=None,
|
|
516
|
+
call_credentials=None,
|
|
517
|
+
insecure=False,
|
|
518
|
+
compression=None,
|
|
519
|
+
wait_for_ready=None,
|
|
520
|
+
timeout=None,
|
|
521
|
+
metadata=None):
|
|
522
|
+
return grpc.experimental.unary_unary(
|
|
523
|
+
request,
|
|
524
|
+
target,
|
|
525
|
+
'/hermes.IndexService/Reorder',
|
|
526
|
+
hermes__pb2.ReorderRequest.SerializeToString,
|
|
527
|
+
hermes__pb2.ReorderResponse.FromString,
|
|
528
|
+
options,
|
|
529
|
+
channel_credentials,
|
|
530
|
+
insecure,
|
|
531
|
+
call_credentials,
|
|
532
|
+
compression,
|
|
533
|
+
wait_for_ready,
|
|
534
|
+
timeout,
|
|
535
|
+
metadata,
|
|
536
|
+
_registered_method=True)
|
|
537
|
+
|
|
494
538
|
@staticmethod
|
|
495
539
|
def DeleteIndex(request,
|
|
496
540
|
target,
|
|
File without changes
|
|
File without changes
|
{hermes_client_python-1.8.0 → hermes_client_python-1.8.2}/src/hermes_client_python/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|