hermes-client-python 1.8.133__tar.gz → 1.8.135__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: hermes-client-python
3
- Version: 1.8.133
3
+ Version: 1.8.135
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
@@ -337,3 +337,43 @@ union before global inference. Exports that exceed budgets fail explicitly.
337
337
  Expressions are bounded to 4 KiB, 256 tokens and 32 parenthesis levels. Invalid
338
338
  variables, invalid syntax and non-finite predictions fail explicitly. Servers
339
339
  and brokers must support `formula_v1` (`candidate_scoring_version=3`).
340
+
341
+ ### Compact deleted rows
342
+
343
+ ```python
344
+ await client.force_merge("articles") # Copy encoded data and retain tombstones.
345
+ await client.force_merge("articles", compact=True) # Remove deleted rows physically.
346
+ info = await client.get_index_info("articles")
347
+ print(info.num_deleted_docs, info.physical_num_docs, info.deleted_ratio)
348
+ ```
349
+
350
+ Compaction also works when there is only one segment. It preserves surviving
351
+ values and may change document addresses and BM25 statistics.
352
+
353
+ ### Delete and upsert documents
354
+
355
+ Declare one text field `[primary]` in the schema. Deletion removes the document
356
+ and all of its chunks; upserts replace the entire document, including indexed-only
357
+ fields, and insert when the key is absent.
358
+
359
+ ```python
360
+ await client.delete_document("articles", "obsolete-key")
361
+ await client.upsert_document(
362
+ "articles",
363
+ {"id": "article-42", "body": ["replacement chunk one", "replacement chunk two"]},
364
+ )
365
+ await client.commit("articles")
366
+
367
+ result = await client.delete_documents("articles", ["old-a", "old-b"])
368
+ print(result.accepted_count, result.errors) # errors: [{"index": 0, "error": "..."}]
369
+ await client.commit("articles") # publishes accepted operations
370
+ ```
371
+
372
+ `upsert_documents` takes a list of complete replacement documents and returns the
373
+ same `DocumentMutationResult`. Single-document helpers raise on rejection. Missing
374
+ deletion keys are accepted. Commit before deleting/upserting a key with a pending
375
+ insertion or replacement. Limits are 100,000 deletion keys / 8 MiB key bytes and
376
+ 1,000 replacement documents / 32 MiB encoded bytes. Mutations use the usual timeout
377
+ argument; an expired RPC may have staged work, so do not blindly retry replacements.
378
+ Broker commits are atomic within each partition. Physical cleanup remains
379
+ `await client.force_merge("articles", compact=True)`.
@@ -313,3 +313,43 @@ union before global inference. Exports that exceed budgets fail explicitly.
313
313
  Expressions are bounded to 4 KiB, 256 tokens and 32 parenthesis levels. Invalid
314
314
  variables, invalid syntax and non-finite predictions fail explicitly. Servers
315
315
  and brokers must support `formula_v1` (`candidate_scoring_version=3`).
316
+
317
+ ### Compact deleted rows
318
+
319
+ ```python
320
+ await client.force_merge("articles") # Copy encoded data and retain tombstones.
321
+ await client.force_merge("articles", compact=True) # Remove deleted rows physically.
322
+ info = await client.get_index_info("articles")
323
+ print(info.num_deleted_docs, info.physical_num_docs, info.deleted_ratio)
324
+ ```
325
+
326
+ Compaction also works when there is only one segment. It preserves surviving
327
+ values and may change document addresses and BM25 statistics.
328
+
329
+ ### Delete and upsert documents
330
+
331
+ Declare one text field `[primary]` in the schema. Deletion removes the document
332
+ and all of its chunks; upserts replace the entire document, including indexed-only
333
+ fields, and insert when the key is absent.
334
+
335
+ ```python
336
+ await client.delete_document("articles", "obsolete-key")
337
+ await client.upsert_document(
338
+ "articles",
339
+ {"id": "article-42", "body": ["replacement chunk one", "replacement chunk two"]},
340
+ )
341
+ await client.commit("articles")
342
+
343
+ result = await client.delete_documents("articles", ["old-a", "old-b"])
344
+ print(result.accepted_count, result.errors) # errors: [{"index": 0, "error": "..."}]
345
+ await client.commit("articles") # publishes accepted operations
346
+ ```
347
+
348
+ `upsert_documents` takes a list of complete replacement documents and returns the
349
+ same `DocumentMutationResult`. Single-document helpers raise on rejection. Missing
350
+ deletion keys are accepted. Commit before deleting/upserting a key with a pending
351
+ insertion or replacement. Limits are 100,000 deletion keys / 8 MiB key bytes and
352
+ 1,000 replacement documents / 32 MiB encoded bytes. Mutations use the usual timeout
353
+ argument; an expired RPC may have staged work, so do not blindly retry replacements.
354
+ Broker commits are atomic within each partition. Physical cleanup remains
355
+ `await client.force_merge("articles", compact=True)`.
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "hermes-client-python"
7
- version = "1.8.133"
7
+ version = "1.8.135"
8
8
  description = "Async Python client for Hermes search server"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -13,6 +13,8 @@ from .types import (
13
13
  DenseVectorQuery,
14
14
  DocAddress,
15
15
  Document,
16
+ DocumentMutationError,
17
+ DocumentMutationResult,
16
18
  FusionCandidate,
17
19
  FusionCandidateList,
18
20
  IndexInfo,
@@ -51,6 +53,8 @@ __all__ = [
51
53
  "DenseVectorQuery",
52
54
  "DocAddress",
53
55
  "Document",
56
+ "DocumentMutationResult",
57
+ "DocumentMutationError",
54
58
  "IndexInfo",
55
59
  "MatchQuery",
56
60
  "OrdinalScore",
@@ -20,6 +20,7 @@ from .types import (
20
20
  CandidateScores,
21
21
  DocAddress,
22
22
  Document,
23
+ DocumentMutationResult,
23
24
  FusionCandidate,
24
25
  FusionCandidateList,
25
26
  IndexInfo,
@@ -223,6 +224,9 @@ class HermesClient:
223
224
  num_docs=response.num_docs,
224
225
  num_segments=response.num_segments,
225
226
  schema=response.schema,
227
+ physical_num_docs=response.physical_num_docs,
228
+ num_deleted_docs=response.num_deleted_docs,
229
+ deleted_ratio=response.deleted_ratio,
226
230
  candidate_scoring_version=response.candidate_scoring_version,
227
231
  unprepared_candidate_fields=list(response.unprepared_candidate_fields),
228
232
  vector_stats=vector_stats,
@@ -279,6 +283,95 @@ class HermesClient:
279
283
  """
280
284
  await self.index_documents(index_name, [document], timeout=timeout)
281
285
 
286
+ async def delete_documents(
287
+ self,
288
+ index_name: str,
289
+ primary_keys: list[str],
290
+ timeout: float | None = None,
291
+ ) -> DocumentMutationResult:
292
+ """Stage exact-key deletions of whole documents, including all chunks.
293
+
294
+ Missing keys are accepted. Inspect per-item errors; commit publishes
295
+ accepted operations. Do not blindly retry after an uncertain RPC outcome.
296
+ """
297
+ self._ensure_connected()
298
+ if (
299
+ len(primary_keys) > 100_000
300
+ or sum(len(key.encode("utf-8")) for key in primary_keys) > 8 * 1024 * 1024
301
+ ):
302
+ raise ValueError(
303
+ "deletion request exceeds 100000 keys or 8 MiB of key bytes"
304
+ )
305
+ response = await self._index_stub.DeleteDocuments(
306
+ pb.DeleteDocumentsRequest(index_name=index_name, primary_keys=primary_keys),
307
+ timeout=self._deadline(timeout),
308
+ )
309
+ return DocumentMutationResult(
310
+ response.accepted_count,
311
+ [{"index": error.index, "error": error.error} for error in response.errors],
312
+ )
313
+
314
+ async def delete_document(
315
+ self,
316
+ index_name: str,
317
+ primary_key: str,
318
+ timeout: float | None = None,
319
+ ) -> None:
320
+ """Stage one deletion; raises if rejected. Call commit to publish."""
321
+ result = await self.delete_documents(index_name, [primary_key], timeout=timeout)
322
+ if result.errors or result.accepted_count != 1:
323
+ raise RuntimeError(
324
+ result.errors[0]["error"]
325
+ if result.errors
326
+ else "deletion was not accepted"
327
+ )
328
+
329
+ async def upsert_documents(
330
+ self,
331
+ index_name: str,
332
+ documents: list[dict[str, Any]],
333
+ timeout: float | None = None,
334
+ ) -> DocumentMutationResult:
335
+ """Stage complete replacements, inserting missing keys. No partial patches.
336
+
337
+ Each document must contain its primary key. Inspect per-item errors;
338
+ commit publishes accepted operations. At most one pending replacement
339
+ per key is allowed, including across calls.
340
+ """
341
+ self._ensure_connected()
342
+ if len(documents) > 1_000:
343
+ raise ValueError("upsert request exceeds 1000 documents")
344
+ request = pb.UpsertDocumentsRequest(
345
+ index_name=index_name,
346
+ documents=[
347
+ pb.NamedDocument(fields=_to_field_entries(doc)) for doc in documents
348
+ ],
349
+ )
350
+ if request.ByteSize() > 32 * 1024 * 1024:
351
+ raise ValueError("upsert request exceeds 32 MiB encoded bytes")
352
+ response = await self._index_stub.UpsertDocuments(
353
+ request, timeout=self._deadline(timeout)
354
+ )
355
+ return DocumentMutationResult(
356
+ response.accepted_count,
357
+ [{"index": error.index, "error": error.error} for error in response.errors],
358
+ )
359
+
360
+ async def upsert_document(
361
+ self,
362
+ index_name: str,
363
+ document: dict[str, Any],
364
+ timeout: float | None = None,
365
+ ) -> None:
366
+ """Stage one complete replacement; raises if rejected. Commit to publish."""
367
+ result = await self.upsert_documents(index_name, [document], timeout=timeout)
368
+ if result.errors or result.accepted_count != 1:
369
+ raise RuntimeError(
370
+ result.errors[0]["error"]
371
+ if result.errors
372
+ else "upsert was not accepted"
373
+ )
374
+
282
375
  async def index_documents_stream(
283
376
  self,
284
377
  index_name: str,
@@ -324,8 +417,10 @@ class HermesClient:
324
417
  )
325
418
  return response.num_docs
326
419
 
327
- async def force_merge(self, index_name: str, timeout: float | None = None) -> int:
328
- """Force merge all segments.
420
+ async def force_merge(
421
+ self, index_name: str, timeout: float | None = None, *, compact: bool = False
422
+ ) -> int:
423
+ """Force merge all segments; compact=True physically removes deleted rows.
329
424
 
330
425
  Args:
331
426
  index_name: Name of the index
@@ -334,7 +429,7 @@ class HermesClient:
334
429
  Number of segments after merge
335
430
  """
336
431
  self._ensure_connected()
337
- request = pb.ForceMergeRequest(index_name=index_name)
432
+ request = pb.ForceMergeRequest(index_name=index_name, compact=compact)
338
433
  response = await self._index_stub.ForceMerge(
339
434
  request, timeout=self._deadline(timeout)
340
435
  )
@@ -19,7 +19,7 @@ _sym_db = _symbol_database.Default()
19
19
 
20
20
 
21
21
  DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
22
- b'\n\x0chermes.proto\x12\x06hermes"\x86\x04\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\x12%\n\x06prefix\x18\t \x01(\x0b\x32\x13.hermes.PrefixQueryH\x00\x12=\n\x13\x62inary_dense_vector\x18\n \x01(\x0b\x32\x1e.hermes.BinaryDenseVectorQueryH\x00\x12%\n\x06\x66usion\x18\x0b \x01(\x0b\x32\x13.hermes.FusionQueryH\x00\x12%\n\x06phrase\x18\x0c \x01(\x0b\x32\x13.hermes.PhraseQueryH\x00\x42\x07\n\x05query"\x82\x01\n\rWeightedQuery\x12\x1c\n\x05query\x18\x01 \x01(\x0b\x32\r.hermes.Query\x12\x0e\n\x06weight\x18\x02 \x01(\x02\x12\x0c\n\x04name\x18\x03 \x01(\t\x12!\n\x05scope\x18\x04 \x01(\x0e\x32\x12.hermes.ScoreScope\x12\x12\n\nscore_only\x18\x05 \x01(\x08"\xd1\x01\n\x0b\x46usionQuery\x12&\n\x07queries\x18\x01 \x03(\x0b\x32\x15.hermes.WeightedQuery\x12$\n\x06method\x18\x02 \x01(\x0e\x32\x14.hermes.FusionMethod\x12\r\n\x05rrf_k\x18\x03 \x01(\x02\x12,\n\x08\x63ombiner\x18\x05 \x01(\x0e\x32\x1a.hermes.MultiValueCombiner\x12\x1e\n\x07\x66ilters\x18\x06 \x03(\x0b\x32\r.hermes.Query\x12\x17\n\x0f\x63\x61ndidate_depth\x18\x07 \x01(\r"\xf3\x01\n\tL1Ranking\x12\x15\n\x08\x62\x61\x63kfill\x18\x04 \x01(\x08H\x00\x88\x01\x01\x12<\n\x0emissing_values\x18\x05 \x03(\x0b\x32$.hermes.L1Ranking.MissingValuesEntry\x12\x0f\n\x07\x66ormula\x18\x07 \x01(\t\x1a\x34\n\x12MissingValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\x42\x0b\n\t_backfillJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04J\x04\x08\x06\x10\x07R\x07weightsR\x04\x62iasR\ntransformsR\nrrf_weight"B\n\x0bScoreExport\x12\x1d\n\x15passages_per_document\x18\x01 \x01(\r\x12\x14\n\x0c\x61ll_passages\x18\x02 \x01(\x08"\xcb\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\x12\x16\n\tlsp_gamma\x18\r \x01(\rH\x00\x88\x01\x01\x42\x0c\n\n_lsp_gamma"\xbd\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,\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"\xb3\x01\n\x16\x42inaryDenseVectorQuery\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0e\n\x06vector\x18\x02 \x01(\x0c\x12,\n\x08\x63ombiner\x18\x03 \x01(\x0e\x32\x1a.hermes.MultiValueCombiner\x12\x1c\n\x14\x63ombiner_temperature\x18\x04 \x01(\x02\x12\x16\n\x0e\x63ombiner_top_k\x18\x05 \x01(\r\x12\x16\n\x0e\x63ombiner_decay\x18\x06 \x01(\x02"@\n\tTermQuery\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04term\x18\x02 \x01(\t\x12\x16\n\x0etokenizer_hint\x18\x03 \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"\x9d\x01\n\nMatchQuery\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04text\x18\x02 \x01(\t\x12\x16\n\x0etokenizer_hint\x18\x03 \x01(\t\x12\x18\n\x10proximity_weight\x18\x04 \x01(\x02\x12\x18\n\x10proximity_window\x18\x05 \x01(\r\x12\x13\n\x0bheap_factor\x18\x06 \x01(\x02\x12\x11\n\tmax_terms\x18\x07 \x01(\r"P\n\x0bPhraseQuery\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04text\x18\x02 \x01(\t\x12\x0c\n\x04slop\x18\x03 \x01(\r\x12\x16\n\x0etokenizer_hint\x18\x04 \x01(\t",\n\x0bPrefixQuery\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0e\n\x06prefix\x18\x02 \x01(\t"\xe4\x01\n\x08Reranker\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0e\n\x06vector\x18\x02 \x03(\x02\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\x12\x15\n\rbinary_vector\x18\t \x01(\x0c\x12\r\n\x05rrf_k\x18\n \x01(\x02"\xeb\x02\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\x12\x17\n\x0f\x63\x61ndidate_limit\x18\x07 \x01(\r\x12\x16\n\x0etime_budget_ms\x18\x08 \x01(\x04\x12%\n\ntext_stats\x18\t \x01(\x0b\x32\x11.hermes.TextStats\x12\x1d\n\x02l1\x18\n \x01(\x0b\x32\x11.hermes.L1Ranking\x12)\n\x0cscore_export\x18\x0b \x01(\x0b\x32\x13.hermes.ScoreExport\x12\x1a\n\x12include_rrf_scores\x18\x0c \x01(\x08\x12\x0f\n\x07tracing\x18\r \x01(\x08"G\n\x13GetTextStatsRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x1c\n\x05query\x18\x02 \x01(\x0b\x32\r.hermes.Query"8\n\x14GetTextStatsResponse\x12 \n\x05stats\x18\x01 \x01(\x0b\x32\x11.hermes.TextStats"G\n\tTextStats\x12\x12\n\ntotal_docs\x18\x01 \x01(\x04\x12&\n\x06\x66ields\x18\x02 \x03(\x0b\x32\x16.hermes.TextFieldStats"i\n\x0eTextFieldStats\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x13\n\x0b\x63orpus_size\x18\x02 \x01(\x04\x12\x0f\n\x07\x61vg_len\x18\x03 \x01(\x02\x12"\n\x05terms\x18\x04 \x03(\x0b\x32\x13.hermes.TermDocFreq"-\n\x0bTermDocFreq\x12\x0c\n\x04term\x18\x01 \x01(\x0c\x12\x10\n\x08\x64oc_freq\x18\x02 \x01(\x04"0\n\nDocAddress\x12\x12\n\nsegment_id\x18\x01 \x01(\t\x12\x0e\n\x06\x64oc_id\x18\x02 \x01(\r"\xf0\x02\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\x12\x31\n\x10\x63\x61ndidate_scores\x18\x05 \x01(\x0b\x32\x17.hermes.CandidateScores\x12\x16\n\trrf_score\x18\x06 \x01(\x02H\x00\x88\x01\x01\x12\x32\n\x11rrf_contributions\x18\x07 \x03(\x0b\x32\x17.hermes.RrfContribution\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\x42\x0c\n\n_rrf_score"y\n\x0fRrfContribution\x12\x13\n\x0bquery_index\x18\x01 \x01(\r\x12\x12\n\nquery_name\x18\x02 \x01(\t\x12\x0c\n\x04rank\x18\x03 \x01(\r\x12\r\n\x05score\x18\x04 \x01(\x02\x12\x14\n\x07ordinal\x18\x05 \x01(\rH\x00\x88\x01\x01\x42\n\n\x08_ordinal"\xbd\x01\n\x0f\x43\x61ndidateScores\x12\x37\n\x08\x64ocument\x18\x01 \x03(\x0b\x32%.hermes.CandidateScores.DocumentEntry\x12\'\n\x08passages\x18\x02 \x03(\x0b\x32\x15.hermes.PassageScores\x12\x17\n\x0fscored_passages\x18\x03 \x01(\r\x1a/\n\rDocumentEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01"\xa6\x01\n\rPassageScores\x12\x0f\n\x07ordinal\x18\x01 \x01(\r\x12\x31\n\x06scores\x18\x02 \x03(\x0b\x32!.hermes.PassageScores.ScoresEntry\x12\x15\n\x08l1_score\x18\x03 \x01(\x02H\x00\x88\x01\x01\x1a-\n\x0bScoresEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01\x42\x0b\n\t_l1_score"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"\xfa\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\x12\x1d\n\x13\x62inary_dense_vector\x18\t \x01(\x0cH\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"\x85\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\x12\x11\n\ttruncated\x18\x05 \x01(\x08\x12\x16\n\x0eranking_method\x18\x06 \x01(\t\x12\x36\n\x11\x66usion_candidates\x18\x07 \x03(\x0b\x32\x1b.hermes.FusionCandidateList\x12"\n\x05trace\x18\x08 \x01(\x0b\x32\x13.hermes.SearchTrace"7\n\x0bSearchTrace\x12(\n\x06shards\x18\x01 \x03(\x0b\x32\x18.hermes.ShardSearchTrace"\xe7\x01\n\x10ShardSearchTrace\x12\x10\n\x08shard_id\x18\x01 \x01(\t\x12\x12\n\nbackend_id\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12#\n\x07queries\x18\x04 \x03(\x0b\x32\x12.hermes.QueryTrace\x12)\n\x08selected\x18\x05 \x03(\x0b\x32\x17.hermes.FusionCandidate\x12\x16\n\x0eranking_method\x18\x06 \x01(\t\x12\x11\n\ttruncated\x18\x07 \x01(\x08\x12\x1e\n\x07\x66ilters\x18\x08 \x03(\x0b\x32\r.hermes.Query"\xe4\x01\n\nQueryTrace\x12\x13\n\x0bquery_index\x18\x01 \x01(\r\x12\x12\n\nquery_name\x18\x02 \x01(\t\x12\x1c\n\x05query\x18\x03 \x01(\x0b\x32\r.hermes.Query\x12!\n\x05scope\x18\x04 \x01(\x0e\x32\x12.hermes.ScoreScope\x12\x12\n\nscore_only\x18\x05 \x01(\x08\x12\x17\n\x0f\x63\x61ndidate_depth\x18\x06 \x01(\r\x12\x12\n\ntotal_seen\x18\x07 \x01(\r\x12+\n\ncandidates\x18\x08 \x03(\x0b\x32\x17.hermes.FusionCandidate"W\n\x13\x46usionCandidateList\x12\x13\n\x0bquery_index\x18\x01 \x01(\r\x12+\n\ncandidates\x18\x02 \x03(\x0b\x32\x17.hermes.FusionCandidate"s\n\x0f\x46usionCandidate\x12#\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0b\x32\x12.hermes.DocAddress\x12\r\n\x05score\x18\x02 \x01(\x02\x12,\n\x0eordinal_scores\x18\x03 \x03(\x0b\x32\x14.hermes.OrdinalScore"v\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\x12\x1c\n\x14\x63\x61ndidate_scoring_us\x18\x05 \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"\xb1\x02\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\x12*\n\x0btext_fields\x18\x07 \x03(\x0b\x32\x15.hermes.TextFieldInfo\x12!\n\x19\x63\x61ndidate_scoring_version\x18\x08 \x01(\r\x12#\n\x1bunprepared_candidate_fields\x18\t \x03(\t"y\n\rTextFieldInfo\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0f\n\x07lexical\x18\x02 \x01(\x08\x12\x12\n\nhint_field\x18\x03 \x01(\t\x12\x10\n\x08variants\x18\x04 \x01(\x08\x12\x11\n\tpositions\x18\x05 \x01(\x08\x12\x0f\n\x07\x63hunked\x18\x06 \x01(\x08"\x83\x01\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\x12\x1c\n\x14\x61vg_terms_per_vector\x18\x05 \x01(\x02"\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"W\n\x17\x41lterVectorIndexRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x12\n\nfield_name\x18\x02 \x01(\t\x12\x14\n\x0c\x66ield_schema\x18\x03 \x01(\t"h\n\x18\x41lterVectorIndexResponse\x12\x1e\n\x16publication_generation\x18\x01 \x01(\x04\x12,\n\x05state\x18\x02 \x01(\x0e\x32\x1d.hermes.VectorIndexAlterState"$\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*Y\n\x0c\x46usionMethod\x12\x0e\n\nFUSION_RRF\x10\x00\x12"\n\x1e\x46USION_NORMALIZED_WEIGHTED_SUM\x10\x01\x12\x15\n\x11\x46USION_CANDIDATES\x10\x02*Z\n\nScoreScope\x12\x1b\n\x17SCORE_SCOPE_UNSPECIFIED\x10\x00\x12\x18\n\x14SCORE_SCOPE_DOCUMENT\x10\x01\x12\x15\n\x11SCORE_SCOPE_CHUNK\x10\x02*\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*\xbf\x01\n\x15VectorIndexAlterState\x12(\n$VECTOR_INDEX_ALTER_STATE_UNSPECIFIED\x10\x00\x12"\n\x1eVECTOR_INDEX_ALTER_STATE_BUILT\x10\x01\x12*\n&VECTOR_INDEX_ALTER_STATE_DEFERRED_FLAT\x10\x02\x12,\n(VECTOR_INDEX_ALTER_STATE_PARAMETERS_ONLY\x10\x03\x32\xa6\x02\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.GetIndexInfoResponse\x12I\n\x0cGetTextStats\x12\x1b.hermes.GetTextStatsRequest\x1a\x1c.hermes.GetTextStatsResponse2\x86\x06\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.RetrainVectorIndexResponse\x12U\n\x10\x41lterVectorIndex\x12\x1f.hermes.AlterVectorIndexRequest\x1a .hermes.AlterVectorIndexResponseb\x06proto3'
22
+ b'\n\x0chermes.proto\x12\x06hermes"\x86\x04\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\x12%\n\x06prefix\x18\t \x01(\x0b\x32\x13.hermes.PrefixQueryH\x00\x12=\n\x13\x62inary_dense_vector\x18\n \x01(\x0b\x32\x1e.hermes.BinaryDenseVectorQueryH\x00\x12%\n\x06\x66usion\x18\x0b \x01(\x0b\x32\x13.hermes.FusionQueryH\x00\x12%\n\x06phrase\x18\x0c \x01(\x0b\x32\x13.hermes.PhraseQueryH\x00\x42\x07\n\x05query"\x82\x01\n\rWeightedQuery\x12\x1c\n\x05query\x18\x01 \x01(\x0b\x32\r.hermes.Query\x12\x0e\n\x06weight\x18\x02 \x01(\x02\x12\x0c\n\x04name\x18\x03 \x01(\t\x12!\n\x05scope\x18\x04 \x01(\x0e\x32\x12.hermes.ScoreScope\x12\x12\n\nscore_only\x18\x05 \x01(\x08"\xd1\x01\n\x0b\x46usionQuery\x12&\n\x07queries\x18\x01 \x03(\x0b\x32\x15.hermes.WeightedQuery\x12$\n\x06method\x18\x02 \x01(\x0e\x32\x14.hermes.FusionMethod\x12\r\n\x05rrf_k\x18\x03 \x01(\x02\x12,\n\x08\x63ombiner\x18\x05 \x01(\x0e\x32\x1a.hermes.MultiValueCombiner\x12\x1e\n\x07\x66ilters\x18\x06 \x03(\x0b\x32\r.hermes.Query\x12\x17\n\x0f\x63\x61ndidate_depth\x18\x07 \x01(\r"\xf3\x01\n\tL1Ranking\x12\x15\n\x08\x62\x61\x63kfill\x18\x04 \x01(\x08H\x00\x88\x01\x01\x12<\n\x0emissing_values\x18\x05 \x03(\x0b\x32$.hermes.L1Ranking.MissingValuesEntry\x12\x0f\n\x07\x66ormula\x18\x07 \x01(\t\x1a\x34\n\x12MissingValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\x42\x0b\n\t_backfillJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04J\x04\x08\x06\x10\x07R\x07weightsR\x04\x62iasR\ntransformsR\nrrf_weight"B\n\x0bScoreExport\x12\x1d\n\x15passages_per_document\x18\x01 \x01(\r\x12\x14\n\x0c\x61ll_passages\x18\x02 \x01(\x08"\xcb\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\x12\x16\n\tlsp_gamma\x18\r \x01(\rH\x00\x88\x01\x01\x42\x0c\n\n_lsp_gamma"\xbd\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,\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"\xb3\x01\n\x16\x42inaryDenseVectorQuery\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0e\n\x06vector\x18\x02 \x01(\x0c\x12,\n\x08\x63ombiner\x18\x03 \x01(\x0e\x32\x1a.hermes.MultiValueCombiner\x12\x1c\n\x14\x63ombiner_temperature\x18\x04 \x01(\x02\x12\x16\n\x0e\x63ombiner_top_k\x18\x05 \x01(\r\x12\x16\n\x0e\x63ombiner_decay\x18\x06 \x01(\x02"@\n\tTermQuery\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04term\x18\x02 \x01(\t\x12\x16\n\x0etokenizer_hint\x18\x03 \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"\x9d\x01\n\nMatchQuery\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04text\x18\x02 \x01(\t\x12\x16\n\x0etokenizer_hint\x18\x03 \x01(\t\x12\x18\n\x10proximity_weight\x18\x04 \x01(\x02\x12\x18\n\x10proximity_window\x18\x05 \x01(\r\x12\x13\n\x0bheap_factor\x18\x06 \x01(\x02\x12\x11\n\tmax_terms\x18\x07 \x01(\r"P\n\x0bPhraseQuery\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04text\x18\x02 \x01(\t\x12\x0c\n\x04slop\x18\x03 \x01(\r\x12\x16\n\x0etokenizer_hint\x18\x04 \x01(\t",\n\x0bPrefixQuery\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0e\n\x06prefix\x18\x02 \x01(\t"\xe4\x01\n\x08Reranker\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0e\n\x06vector\x18\x02 \x03(\x02\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\x12\x15\n\rbinary_vector\x18\t \x01(\x0c\x12\r\n\x05rrf_k\x18\n \x01(\x02"\xeb\x02\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\x12\x17\n\x0f\x63\x61ndidate_limit\x18\x07 \x01(\r\x12\x16\n\x0etime_budget_ms\x18\x08 \x01(\x04\x12%\n\ntext_stats\x18\t \x01(\x0b\x32\x11.hermes.TextStats\x12\x1d\n\x02l1\x18\n \x01(\x0b\x32\x11.hermes.L1Ranking\x12)\n\x0cscore_export\x18\x0b \x01(\x0b\x32\x13.hermes.ScoreExport\x12\x1a\n\x12include_rrf_scores\x18\x0c \x01(\x08\x12\x0f\n\x07tracing\x18\r \x01(\x08"G\n\x13GetTextStatsRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x1c\n\x05query\x18\x02 \x01(\x0b\x32\r.hermes.Query"8\n\x14GetTextStatsResponse\x12 \n\x05stats\x18\x01 \x01(\x0b\x32\x11.hermes.TextStats"G\n\tTextStats\x12\x12\n\ntotal_docs\x18\x01 \x01(\x04\x12&\n\x06\x66ields\x18\x02 \x03(\x0b\x32\x16.hermes.TextFieldStats"i\n\x0eTextFieldStats\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x13\n\x0b\x63orpus_size\x18\x02 \x01(\x04\x12\x0f\n\x07\x61vg_len\x18\x03 \x01(\x02\x12"\n\x05terms\x18\x04 \x03(\x0b\x32\x13.hermes.TermDocFreq"-\n\x0bTermDocFreq\x12\x0c\n\x04term\x18\x01 \x01(\x0c\x12\x10\n\x08\x64oc_freq\x18\x02 \x01(\x04"0\n\nDocAddress\x12\x12\n\nsegment_id\x18\x01 \x01(\t\x12\x0e\n\x06\x64oc_id\x18\x02 \x01(\r"\xf0\x02\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\x12\x31\n\x10\x63\x61ndidate_scores\x18\x05 \x01(\x0b\x32\x17.hermes.CandidateScores\x12\x16\n\trrf_score\x18\x06 \x01(\x02H\x00\x88\x01\x01\x12\x32\n\x11rrf_contributions\x18\x07 \x03(\x0b\x32\x17.hermes.RrfContribution\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\x42\x0c\n\n_rrf_score"y\n\x0fRrfContribution\x12\x13\n\x0bquery_index\x18\x01 \x01(\r\x12\x12\n\nquery_name\x18\x02 \x01(\t\x12\x0c\n\x04rank\x18\x03 \x01(\r\x12\r\n\x05score\x18\x04 \x01(\x02\x12\x14\n\x07ordinal\x18\x05 \x01(\rH\x00\x88\x01\x01\x42\n\n\x08_ordinal"\xbd\x01\n\x0f\x43\x61ndidateScores\x12\x37\n\x08\x64ocument\x18\x01 \x03(\x0b\x32%.hermes.CandidateScores.DocumentEntry\x12\'\n\x08passages\x18\x02 \x03(\x0b\x32\x15.hermes.PassageScores\x12\x17\n\x0fscored_passages\x18\x03 \x01(\r\x1a/\n\rDocumentEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01"\xa6\x01\n\rPassageScores\x12\x0f\n\x07ordinal\x18\x01 \x01(\r\x12\x31\n\x06scores\x18\x02 \x03(\x0b\x32!.hermes.PassageScores.ScoresEntry\x12\x15\n\x08l1_score\x18\x03 \x01(\x02H\x00\x88\x01\x01\x1a-\n\x0bScoresEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01\x42\x0b\n\t_l1_score"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"\xfa\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\x12\x1d\n\x13\x62inary_dense_vector\x18\t \x01(\x0cH\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"\x85\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\x12\x11\n\ttruncated\x18\x05 \x01(\x08\x12\x16\n\x0eranking_method\x18\x06 \x01(\t\x12\x36\n\x11\x66usion_candidates\x18\x07 \x03(\x0b\x32\x1b.hermes.FusionCandidateList\x12"\n\x05trace\x18\x08 \x01(\x0b\x32\x13.hermes.SearchTrace"7\n\x0bSearchTrace\x12(\n\x06shards\x18\x01 \x03(\x0b\x32\x18.hermes.ShardSearchTrace"\xe7\x01\n\x10ShardSearchTrace\x12\x10\n\x08shard_id\x18\x01 \x01(\t\x12\x12\n\nbackend_id\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12#\n\x07queries\x18\x04 \x03(\x0b\x32\x12.hermes.QueryTrace\x12)\n\x08selected\x18\x05 \x03(\x0b\x32\x17.hermes.FusionCandidate\x12\x16\n\x0eranking_method\x18\x06 \x01(\t\x12\x11\n\ttruncated\x18\x07 \x01(\x08\x12\x1e\n\x07\x66ilters\x18\x08 \x03(\x0b\x32\r.hermes.Query"\xe4\x01\n\nQueryTrace\x12\x13\n\x0bquery_index\x18\x01 \x01(\r\x12\x12\n\nquery_name\x18\x02 \x01(\t\x12\x1c\n\x05query\x18\x03 \x01(\x0b\x32\r.hermes.Query\x12!\n\x05scope\x18\x04 \x01(\x0e\x32\x12.hermes.ScoreScope\x12\x12\n\nscore_only\x18\x05 \x01(\x08\x12\x17\n\x0f\x63\x61ndidate_depth\x18\x06 \x01(\r\x12\x12\n\ntotal_seen\x18\x07 \x01(\r\x12+\n\ncandidates\x18\x08 \x03(\x0b\x32\x17.hermes.FusionCandidate"W\n\x13\x46usionCandidateList\x12\x13\n\x0bquery_index\x18\x01 \x01(\r\x12+\n\ncandidates\x18\x02 \x03(\x0b\x32\x17.hermes.FusionCandidate"s\n\x0f\x46usionCandidate\x12#\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0b\x32\x12.hermes.DocAddress\x12\r\n\x05score\x18\x02 \x01(\x02\x12,\n\x0eordinal_scores\x18\x03 \x03(\x0b\x32\x14.hermes.OrdinalScore"v\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\x12\x1c\n\x14\x63\x61ndidate_scoring_us\x18\x05 \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"\xfd\x02\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\x12*\n\x0btext_fields\x18\x07 \x03(\x0b\x32\x15.hermes.TextFieldInfo\x12!\n\x19\x63\x61ndidate_scoring_version\x18\x08 \x01(\r\x12#\n\x1bunprepared_candidate_fields\x18\t \x03(\t\x12\x19\n\x11physical_num_docs\x18\n \x01(\x04\x12\x18\n\x10num_deleted_docs\x18\x0b \x01(\x04\x12\x15\n\rdeleted_ratio\x18\x0c \x01(\x01"y\n\rTextFieldInfo\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0f\n\x07lexical\x18\x02 \x01(\x08\x12\x12\n\nhint_field\x18\x03 \x01(\t\x12\x10\n\x08variants\x18\x04 \x01(\x08\x12\x11\n\tpositions\x18\x05 \x01(\x08\x12\x0f\n\x07\x63hunked\x18\x06 \x01(\x08"\x83\x01\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\x12\x1c\n\x14\x61vg_terms_per_vector\x18\x05 \x01(\x02"\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"B\n\x16\x44\x65leteDocumentsRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x14\n\x0cprimary_keys\x18\x02 \x03(\t"V\n\x16UpsertDocumentsRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12(\n\tdocuments\x18\x02 \x03(\x0b\x32\x15.hermes.NamedDocument"Y\n\x18\x44ocumentMutationResponse\x12\x16\n\x0e\x61\x63\x63\x65pted_count\x18\x01 \x01(\r\x12%\n\x06\x65rrors\x18\x02 \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"8\n\x11\x46orceMergeRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x0f\n\x07\x63ompact\x18\x02 \x01(\x08";\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"W\n\x17\x41lterVectorIndexRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x12\n\nfield_name\x18\x02 \x01(\t\x12\x14\n\x0c\x66ield_schema\x18\x03 \x01(\t"h\n\x18\x41lterVectorIndexResponse\x12\x1e\n\x16publication_generation\x18\x01 \x01(\x04\x12,\n\x05state\x18\x02 \x01(\x0e\x32\x1d.hermes.VectorIndexAlterState"$\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*Y\n\x0c\x46usionMethod\x12\x0e\n\nFUSION_RRF\x10\x00\x12"\n\x1e\x46USION_NORMALIZED_WEIGHTED_SUM\x10\x01\x12\x15\n\x11\x46USION_CANDIDATES\x10\x02*Z\n\nScoreScope\x12\x1b\n\x17SCORE_SCOPE_UNSPECIFIED\x10\x00\x12\x18\n\x14SCORE_SCOPE_DOCUMENT\x10\x01\x12\x15\n\x11SCORE_SCOPE_CHUNK\x10\x02*\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*\xbf\x01\n\x15VectorIndexAlterState\x12(\n$VECTOR_INDEX_ALTER_STATE_UNSPECIFIED\x10\x00\x12"\n\x1eVECTOR_INDEX_ALTER_STATE_BUILT\x10\x01\x12*\n&VECTOR_INDEX_ALTER_STATE_DEFERRED_FLAT\x10\x02\x12,\n(VECTOR_INDEX_ALTER_STATE_PARAMETERS_ONLY\x10\x03\x32\xa6\x02\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.GetIndexInfoResponse\x12I\n\x0cGetTextStats\x12\x1b.hermes.GetTextStatsRequest\x1a\x1c.hermes.GetTextStatsResponse2\xb0\x07\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\x12S\n\x0f\x44\x65leteDocuments\x12\x1e.hermes.DeleteDocumentsRequest\x1a .hermes.DocumentMutationResponse\x12S\n\x0fUpsertDocuments\x12\x1e.hermes.UpsertDocumentsRequest\x1a .hermes.DocumentMutationResponse\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.RetrainVectorIndexResponse\x12U\n\x10\x41lterVectorIndex\x12\x1f.hermes.AlterVectorIndexRequest\x1a .hermes.AlterVectorIndexResponseb\x06proto3'
23
23
  )
24
24
 
25
25
  _globals = globals()
@@ -37,14 +37,14 @@ if not _descriptor._USE_C_DESCRIPTORS:
37
37
  _globals["_PASSAGESCORES_SCORESENTRY"]._serialized_options = b"8\001"
38
38
  _globals["_GETDOCUMENTRESPONSE_FIELDSENTRY"]._loaded_options = None
39
39
  _globals["_GETDOCUMENTRESPONSE_FIELDSENTRY"]._serialized_options = b"8\001"
40
- _globals["_FUSIONMETHOD"]._serialized_start = 8843
41
- _globals["_FUSIONMETHOD"]._serialized_end = 8932
42
- _globals["_SCORESCOPE"]._serialized_start = 8934
43
- _globals["_SCORESCOPE"]._serialized_end = 9024
44
- _globals["_MULTIVALUECOMBINER"]._serialized_start = 9027
45
- _globals["_MULTIVALUECOMBINER"]._serialized_end = 9156
46
- _globals["_VECTORINDEXALTERSTATE"]._serialized_start = 9159
47
- _globals["_VECTORINDEXALTERSTATE"]._serialized_end = 9350
40
+ _globals["_FUSIONMETHOD"]._serialized_start = 9183
41
+ _globals["_FUSIONMETHOD"]._serialized_end = 9272
42
+ _globals["_SCORESCOPE"]._serialized_start = 9274
43
+ _globals["_SCORESCOPE"]._serialized_end = 9364
44
+ _globals["_MULTIVALUECOMBINER"]._serialized_start = 9367
45
+ _globals["_MULTIVALUECOMBINER"]._serialized_end = 9496
46
+ _globals["_VECTORINDEXALTERSTATE"]._serialized_start = 9499
47
+ _globals["_VECTORINDEXALTERSTATE"]._serialized_end = 9690
48
48
  _globals["_QUERY"]._serialized_start = 25
49
49
  _globals["_QUERY"]._serialized_end = 543
50
50
  _globals["_WEIGHTEDQUERY"]._serialized_start = 546
@@ -142,65 +142,71 @@ if not _descriptor._USE_C_DESCRIPTORS:
142
142
  _globals["_GETINDEXINFOREQUEST"]._serialized_start = 6318
143
143
  _globals["_GETINDEXINFOREQUEST"]._serialized_end = 6359
144
144
  _globals["_GETINDEXINFORESPONSE"]._serialized_start = 6362
145
- _globals["_GETINDEXINFORESPONSE"]._serialized_end = 6667
146
- _globals["_TEXTFIELDINFO"]._serialized_start = 6669
147
- _globals["_TEXTFIELDINFO"]._serialized_end = 6790
148
- _globals["_VECTORFIELDSTATS"]._serialized_start = 6793
149
- _globals["_VECTORFIELDSTATS"]._serialized_end = 6924
150
- _globals["_MEMORYSTATS"]._serialized_start = 6927
151
- _globals["_MEMORYSTATS"]._serialized_end = 7067
152
- _globals["_INDEXINGBUFFERSTATS"]._serialized_start = 7070
153
- _globals["_INDEXINGBUFFERSTATS"]._serialized_end = 7293
154
- _globals["_SEGMENTREADERSTATS"]._serialized_start = 7296
155
- _globals["_SEGMENTREADERSTATS"]._serialized_end = 7479
156
- _globals["_CREATEINDEXREQUEST"]._serialized_start = 7481
157
- _globals["_CREATEINDEXREQUEST"]._serialized_end = 7537
158
- _globals["_CREATEINDEXRESPONSE"]._serialized_start = 7539
159
- _globals["_CREATEINDEXRESPONSE"]._serialized_end = 7577
160
- _globals["_FIELDENTRY"]._serialized_start = 7579
161
- _globals["_FIELDENTRY"]._serialized_end = 7640
162
- _globals["_NAMEDDOCUMENT"]._serialized_start = 7642
163
- _globals["_NAMEDDOCUMENT"]._serialized_end = 7693
164
- _globals["_BATCHINDEXDOCUMENTSREQUEST"]._serialized_start = 7695
165
- _globals["_BATCHINDEXDOCUMENTSREQUEST"]._serialized_end = 7785
166
- _globals["_BATCHINDEXDOCUMENTSRESPONSE"]._serialized_start = 7787
167
- _globals["_BATCHINDEXDOCUMENTSRESPONSE"]._serialized_end = 7899
168
- _globals["_DOCUMENTERROR"]._serialized_start = 7901
169
- _globals["_DOCUMENTERROR"]._serialized_end = 7946
170
- _globals["_INDEXDOCUMENTREQUEST"]._serialized_start = 7948
171
- _globals["_INDEXDOCUMENTREQUEST"]._serialized_end = 8026
172
- _globals["_INDEXDOCUMENTSRESPONSE"]._serialized_start = 8028
173
- _globals["_INDEXDOCUMENTSRESPONSE"]._serialized_end = 8114
174
- _globals["_COMMITREQUEST"]._serialized_start = 8116
175
- _globals["_COMMITREQUEST"]._serialized_end = 8151
176
- _globals["_COMMITRESPONSE"]._serialized_start = 8153
177
- _globals["_COMMITRESPONSE"]._serialized_end = 8204
178
- _globals["_FORCEMERGEREQUEST"]._serialized_start = 8206
179
- _globals["_FORCEMERGEREQUEST"]._serialized_end = 8245
180
- _globals["_FORCEMERGERESPONSE"]._serialized_start = 8247
181
- _globals["_FORCEMERGERESPONSE"]._serialized_end = 8306
182
- _globals["_DELETEINDEXREQUEST"]._serialized_start = 8308
183
- _globals["_DELETEINDEXREQUEST"]._serialized_end = 8348
184
- _globals["_DELETEINDEXRESPONSE"]._serialized_start = 8350
185
- _globals["_DELETEINDEXRESPONSE"]._serialized_end = 8388
186
- _globals["_LISTINDEXESREQUEST"]._serialized_start = 8390
187
- _globals["_LISTINDEXESREQUEST"]._serialized_end = 8410
188
- _globals["_LISTINDEXESRESPONSE"]._serialized_start = 8412
189
- _globals["_LISTINDEXESRESPONSE"]._serialized_end = 8454
190
- _globals["_RETRAINVECTORINDEXREQUEST"]._serialized_start = 8456
191
- _globals["_RETRAINVECTORINDEXREQUEST"]._serialized_end = 8503
192
- _globals["_RETRAINVECTORINDEXRESPONSE"]._serialized_start = 8505
193
- _globals["_RETRAINVECTORINDEXRESPONSE"]._serialized_end = 8550
194
- _globals["_ALTERVECTORINDEXREQUEST"]._serialized_start = 8552
195
- _globals["_ALTERVECTORINDEXREQUEST"]._serialized_end = 8639
196
- _globals["_ALTERVECTORINDEXRESPONSE"]._serialized_start = 8641
197
- _globals["_ALTERVECTORINDEXRESPONSE"]._serialized_end = 8745
198
- _globals["_REORDERREQUEST"]._serialized_start = 8747
199
- _globals["_REORDERREQUEST"]._serialized_end = 8783
200
- _globals["_REORDERRESPONSE"]._serialized_start = 8785
201
- _globals["_REORDERRESPONSE"]._serialized_end = 8841
202
- _globals["_SEARCHSERVICE"]._serialized_start = 9353
203
- _globals["_SEARCHSERVICE"]._serialized_end = 9647
204
- _globals["_INDEXSERVICE"]._serialized_start = 9650
205
- _globals["_INDEXSERVICE"]._serialized_end = 10424
145
+ _globals["_GETINDEXINFORESPONSE"]._serialized_end = 6743
146
+ _globals["_TEXTFIELDINFO"]._serialized_start = 6745
147
+ _globals["_TEXTFIELDINFO"]._serialized_end = 6866
148
+ _globals["_VECTORFIELDSTATS"]._serialized_start = 6869
149
+ _globals["_VECTORFIELDSTATS"]._serialized_end = 7000
150
+ _globals["_MEMORYSTATS"]._serialized_start = 7003
151
+ _globals["_MEMORYSTATS"]._serialized_end = 7143
152
+ _globals["_INDEXINGBUFFERSTATS"]._serialized_start = 7146
153
+ _globals["_INDEXINGBUFFERSTATS"]._serialized_end = 7369
154
+ _globals["_SEGMENTREADERSTATS"]._serialized_start = 7372
155
+ _globals["_SEGMENTREADERSTATS"]._serialized_end = 7555
156
+ _globals["_CREATEINDEXREQUEST"]._serialized_start = 7557
157
+ _globals["_CREATEINDEXREQUEST"]._serialized_end = 7613
158
+ _globals["_CREATEINDEXRESPONSE"]._serialized_start = 7615
159
+ _globals["_CREATEINDEXRESPONSE"]._serialized_end = 7653
160
+ _globals["_FIELDENTRY"]._serialized_start = 7655
161
+ _globals["_FIELDENTRY"]._serialized_end = 7716
162
+ _globals["_NAMEDDOCUMENT"]._serialized_start = 7718
163
+ _globals["_NAMEDDOCUMENT"]._serialized_end = 7769
164
+ _globals["_BATCHINDEXDOCUMENTSREQUEST"]._serialized_start = 7771
165
+ _globals["_BATCHINDEXDOCUMENTSREQUEST"]._serialized_end = 7861
166
+ _globals["_BATCHINDEXDOCUMENTSRESPONSE"]._serialized_start = 7863
167
+ _globals["_BATCHINDEXDOCUMENTSRESPONSE"]._serialized_end = 7975
168
+ _globals["_DELETEDOCUMENTSREQUEST"]._serialized_start = 7977
169
+ _globals["_DELETEDOCUMENTSREQUEST"]._serialized_end = 8043
170
+ _globals["_UPSERTDOCUMENTSREQUEST"]._serialized_start = 8045
171
+ _globals["_UPSERTDOCUMENTSREQUEST"]._serialized_end = 8131
172
+ _globals["_DOCUMENTMUTATIONRESPONSE"]._serialized_start = 8133
173
+ _globals["_DOCUMENTMUTATIONRESPONSE"]._serialized_end = 8222
174
+ _globals["_DOCUMENTERROR"]._serialized_start = 8224
175
+ _globals["_DOCUMENTERROR"]._serialized_end = 8269
176
+ _globals["_INDEXDOCUMENTREQUEST"]._serialized_start = 8271
177
+ _globals["_INDEXDOCUMENTREQUEST"]._serialized_end = 8349
178
+ _globals["_INDEXDOCUMENTSRESPONSE"]._serialized_start = 8351
179
+ _globals["_INDEXDOCUMENTSRESPONSE"]._serialized_end = 8437
180
+ _globals["_COMMITREQUEST"]._serialized_start = 8439
181
+ _globals["_COMMITREQUEST"]._serialized_end = 8474
182
+ _globals["_COMMITRESPONSE"]._serialized_start = 8476
183
+ _globals["_COMMITRESPONSE"]._serialized_end = 8527
184
+ _globals["_FORCEMERGEREQUEST"]._serialized_start = 8529
185
+ _globals["_FORCEMERGEREQUEST"]._serialized_end = 8585
186
+ _globals["_FORCEMERGERESPONSE"]._serialized_start = 8587
187
+ _globals["_FORCEMERGERESPONSE"]._serialized_end = 8646
188
+ _globals["_DELETEINDEXREQUEST"]._serialized_start = 8648
189
+ _globals["_DELETEINDEXREQUEST"]._serialized_end = 8688
190
+ _globals["_DELETEINDEXRESPONSE"]._serialized_start = 8690
191
+ _globals["_DELETEINDEXRESPONSE"]._serialized_end = 8728
192
+ _globals["_LISTINDEXESREQUEST"]._serialized_start = 8730
193
+ _globals["_LISTINDEXESREQUEST"]._serialized_end = 8750
194
+ _globals["_LISTINDEXESRESPONSE"]._serialized_start = 8752
195
+ _globals["_LISTINDEXESRESPONSE"]._serialized_end = 8794
196
+ _globals["_RETRAINVECTORINDEXREQUEST"]._serialized_start = 8796
197
+ _globals["_RETRAINVECTORINDEXREQUEST"]._serialized_end = 8843
198
+ _globals["_RETRAINVECTORINDEXRESPONSE"]._serialized_start = 8845
199
+ _globals["_RETRAINVECTORINDEXRESPONSE"]._serialized_end = 8890
200
+ _globals["_ALTERVECTORINDEXREQUEST"]._serialized_start = 8892
201
+ _globals["_ALTERVECTORINDEXREQUEST"]._serialized_end = 8979
202
+ _globals["_ALTERVECTORINDEXRESPONSE"]._serialized_start = 8981
203
+ _globals["_ALTERVECTORINDEXRESPONSE"]._serialized_end = 9085
204
+ _globals["_REORDERREQUEST"]._serialized_start = 9087
205
+ _globals["_REORDERREQUEST"]._serialized_end = 9123
206
+ _globals["_REORDERRESPONSE"]._serialized_start = 9125
207
+ _globals["_REORDERRESPONSE"]._serialized_end = 9181
208
+ _globals["_SEARCHSERVICE"]._serialized_start = 9693
209
+ _globals["_SEARCHSERVICE"]._serialized_end = 9987
210
+ _globals["_INDEXSERVICE"]._serialized_start = 9990
211
+ _globals["_INDEXSERVICE"]._serialized_end = 10934
206
212
  # @@protoc_insertion_point(module_scope)
@@ -278,6 +278,18 @@ class IndexServiceStub:
278
278
  response_deserializer=hermes__pb2.BatchIndexDocumentsResponse.FromString,
279
279
  _registered_method=True,
280
280
  )
281
+ self.DeleteDocuments = channel.unary_unary(
282
+ "/hermes.IndexService/DeleteDocuments",
283
+ request_serializer=hermes__pb2.DeleteDocumentsRequest.SerializeToString,
284
+ response_deserializer=hermes__pb2.DocumentMutationResponse.FromString,
285
+ _registered_method=True,
286
+ )
287
+ self.UpsertDocuments = channel.unary_unary(
288
+ "/hermes.IndexService/UpsertDocuments",
289
+ request_serializer=hermes__pb2.UpsertDocumentsRequest.SerializeToString,
290
+ response_deserializer=hermes__pb2.DocumentMutationResponse.FromString,
291
+ _registered_method=True,
292
+ )
281
293
  self.Commit = channel.unary_unary(
282
294
  "/hermes.IndexService/Commit",
283
295
  request_serializer=hermes__pb2.CommitRequest.SerializeToString,
@@ -343,6 +355,18 @@ class IndexServiceServicer:
343
355
  context.set_details("Method not implemented!")
344
356
  raise NotImplementedError("Method not implemented!")
345
357
 
358
+ def DeleteDocuments(self, request, context):
359
+ """Stage whole-document deletions by exact primary key, including every chunk."""
360
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
361
+ context.set_details("Method not implemented!")
362
+ raise NotImplementedError("Method not implemented!")
363
+
364
+ def UpsertDocuments(self, request, context):
365
+ """Stage complete replacements (inserts if absent). Commit publishes them."""
366
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
367
+ context.set_details("Method not implemented!")
368
+ raise NotImplementedError("Method not implemented!")
369
+
346
370
  def Commit(self, request, context):
347
371
  """Commit pending changes"""
348
372
  context.set_code(grpc.StatusCode.UNIMPLEMENTED)
@@ -403,6 +427,16 @@ def add_IndexServiceServicer_to_server(servicer, server):
403
427
  request_deserializer=hermes__pb2.BatchIndexDocumentsRequest.FromString,
404
428
  response_serializer=hermes__pb2.BatchIndexDocumentsResponse.SerializeToString,
405
429
  ),
430
+ "DeleteDocuments": grpc.unary_unary_rpc_method_handler(
431
+ servicer.DeleteDocuments,
432
+ request_deserializer=hermes__pb2.DeleteDocumentsRequest.FromString,
433
+ response_serializer=hermes__pb2.DocumentMutationResponse.SerializeToString,
434
+ ),
435
+ "UpsertDocuments": grpc.unary_unary_rpc_method_handler(
436
+ servicer.UpsertDocuments,
437
+ request_deserializer=hermes__pb2.UpsertDocumentsRequest.FromString,
438
+ response_serializer=hermes__pb2.DocumentMutationResponse.SerializeToString,
439
+ ),
406
440
  "Commit": grpc.unary_unary_rpc_method_handler(
407
441
  servicer.Commit,
408
442
  request_deserializer=hermes__pb2.CommitRequest.FromString,
@@ -540,6 +574,66 @@ class IndexService:
540
574
  _registered_method=True,
541
575
  )
542
576
 
577
+ @staticmethod
578
+ def DeleteDocuments(
579
+ request,
580
+ target,
581
+ options=(),
582
+ channel_credentials=None,
583
+ call_credentials=None,
584
+ insecure=False,
585
+ compression=None,
586
+ wait_for_ready=None,
587
+ timeout=None,
588
+ metadata=None,
589
+ ):
590
+ return grpc.experimental.unary_unary(
591
+ request,
592
+ target,
593
+ "/hermes.IndexService/DeleteDocuments",
594
+ hermes__pb2.DeleteDocumentsRequest.SerializeToString,
595
+ hermes__pb2.DocumentMutationResponse.FromString,
596
+ options,
597
+ channel_credentials,
598
+ insecure,
599
+ call_credentials,
600
+ compression,
601
+ wait_for_ready,
602
+ timeout,
603
+ metadata,
604
+ _registered_method=True,
605
+ )
606
+
607
+ @staticmethod
608
+ def UpsertDocuments(
609
+ request,
610
+ target,
611
+ options=(),
612
+ channel_credentials=None,
613
+ call_credentials=None,
614
+ insecure=False,
615
+ compression=None,
616
+ wait_for_ready=None,
617
+ timeout=None,
618
+ metadata=None,
619
+ ):
620
+ return grpc.experimental.unary_unary(
621
+ request,
622
+ target,
623
+ "/hermes.IndexService/UpsertDocuments",
624
+ hermes__pb2.UpsertDocumentsRequest.SerializeToString,
625
+ hermes__pb2.DocumentMutationResponse.FromString,
626
+ options,
627
+ channel_credentials,
628
+ insecure,
629
+ call_credentials,
630
+ compression,
631
+ wait_for_ready,
632
+ timeout,
633
+ metadata,
634
+ _registered_method=True,
635
+ )
636
+
543
637
  @staticmethod
544
638
  def Commit(
545
639
  request,
@@ -279,5 +279,23 @@ class IndexInfo:
279
279
  num_segments: int
280
280
  schema: str
281
281
  vector_stats: list[VectorFieldStats] = field(default_factory=list)
282
+ physical_num_docs: int = 0
283
+ num_deleted_docs: int = 0
284
+ deleted_ratio: float = 0.0
282
285
  candidate_scoring_version: int = 0
283
286
  unprepared_candidate_fields: list[str] = field(default_factory=list)
287
+
288
+
289
+ class DocumentMutationError(TypedDict):
290
+ """Rejected operation at a zero-based position in the input batch."""
291
+
292
+ index: int
293
+ error: str
294
+
295
+
296
+ @dataclass
297
+ class DocumentMutationResult:
298
+ """Staged operations (not affected rows); commit publishes accepted work."""
299
+
300
+ accepted_count: int
301
+ errors: list[DocumentMutationError] = field(default_factory=list)