hermes-client-python 1.0.4__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.
@@ -0,0 +1,47 @@
1
+ # Build artifacts
2
+ /target/
3
+ /dist/
4
+
5
+ # Data files (generated indexes, processed data)
6
+ /data/
7
+ *.zst
8
+ dump.*
9
+
10
+ # IDE
11
+ .idea/
12
+ .vscode/
13
+ *.swp
14
+ *.swo
15
+ .windsurf/
16
+
17
+ # OS
18
+ .DS_Store
19
+ Thumbs.db
20
+
21
+ # Node.js
22
+ node_modules/
23
+ hermes-web/dist/
24
+
25
+ # Python
26
+ __pycache__/
27
+ *.pyc
28
+ *.pyo
29
+ *.pyd
30
+ .venv/
31
+ venv/
32
+ *.egg-info/
33
+ hermes-python/target/
34
+
35
+ # Rust
36
+ *.rs.bk
37
+ Cargo.lock.bak
38
+
39
+ # WASM build output (regenerated on build)
40
+ hermes-wasm/pkg/
41
+
42
+ # Maturin
43
+ hermes-python/target/
44
+
45
+ # Environment
46
+ .env
47
+ .env.local
@@ -0,0 +1,232 @@
1
+ Metadata-Version: 2.4
2
+ Name: hermes-client-python
3
+ Version: 1.0.4
4
+ Summary: Async Python client for Hermes search server
5
+ Project-URL: Homepage, https://github.com/SpaceFrontiers/hermes
6
+ Project-URL: Repository, https://github.com/SpaceFrontiers/hermes
7
+ Author: izihawa
8
+ License-Expression: MIT
9
+ Keywords: async,full-text-search,grpc,search
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Topic :: Database :: Database Engines/Servers
19
+ Classifier: Topic :: Text Processing :: Indexing
20
+ Requires-Python: >=3.10
21
+ Requires-Dist: grpcio>=1.76.0
22
+ Requires-Dist: protobuf>=6.33.4
23
+ Description-Content-Type: text/markdown
24
+
25
+ # Hermes Client
26
+
27
+ Async Python client for [Hermes](https://github.com/SpaceFrontiers/hermes) search server.
28
+
29
+ ## Installation
30
+
31
+ ```bash
32
+ pip install hermes-client-python
33
+ ```
34
+
35
+ ## Quick Start
36
+
37
+ ```python
38
+ import asyncio
39
+ from hermes_client_python import HermesClient
40
+
41
+ async def main():
42
+ async with HermesClient("localhost:50051") as client:
43
+ # Create index with SDL schema
44
+ await client.create_index("articles", '''
45
+ index articles {
46
+ title: text indexed stored
47
+ body: text indexed stored
48
+ score: f64 stored
49
+ }
50
+ ''')
51
+
52
+ # Index documents
53
+ await client.index_documents("articles", [
54
+ {"title": "Hello World", "body": "First article", "score": 1.5},
55
+ {"title": "Goodbye World", "body": "Last article", "score": 2.0},
56
+ ])
57
+
58
+ # Commit changes
59
+ await client.commit("articles")
60
+
61
+ # Search
62
+ results = await client.search("articles", term=("title", "hello"), limit=10)
63
+ for hit in results.hits:
64
+ print(f"Doc {hit.doc_id}: score={hit.score}, fields={hit.fields}")
65
+
66
+ # Get document by ID
67
+ doc = await client.get_document("articles", 0)
68
+ print(doc.fields)
69
+
70
+ # Delete index
71
+ await client.delete_index("articles")
72
+
73
+ asyncio.run(main())
74
+ ```
75
+
76
+ ## API Reference
77
+
78
+ ### HermesClient
79
+
80
+ ```python
81
+ client = HermesClient(address="localhost:50051")
82
+ ```
83
+
84
+ #### Connection
85
+
86
+ ```python
87
+ # Using context manager (recommended)
88
+ async with HermesClient("localhost:50051") as client:
89
+ ...
90
+
91
+ # Manual connection
92
+ client = HermesClient("localhost:50051")
93
+ await client.connect()
94
+ # ... use client ...
95
+ await client.close()
96
+ ```
97
+
98
+ #### Index Management
99
+
100
+ ```python
101
+ # Create index with SDL schema
102
+ await client.create_index("myindex", '''
103
+ index myindex {
104
+ title: text indexed stored
105
+ body: text indexed stored
106
+ }
107
+ ''')
108
+
109
+ # Create index with JSON schema
110
+ await client.create_index("myindex", '''
111
+ {
112
+ "fields": [
113
+ {"name": "title", "type": "text", "indexed": true, "stored": true},
114
+ {"name": "body", "type": "text", "indexed": true, "stored": true}
115
+ ]
116
+ }
117
+ ''')
118
+
119
+ # Get index info
120
+ info = await client.get_index_info("myindex")
121
+ print(f"Documents: {info.num_docs}, Segments: {info.num_segments}")
122
+
123
+ # Delete index
124
+ await client.delete_index("myindex")
125
+ ```
126
+
127
+ #### Document Indexing
128
+
129
+ ```python
130
+ # Index multiple documents (batch)
131
+ indexed, errors = await client.index_documents("myindex", [
132
+ {"title": "Doc 1", "body": "Content 1"},
133
+ {"title": "Doc 2", "body": "Content 2"},
134
+ ])
135
+
136
+ # Index single document
137
+ await client.index_document("myindex", {"title": "Doc", "body": "Content"})
138
+
139
+ # Stream documents (for large datasets)
140
+ async def doc_generator():
141
+ for i in range(10000):
142
+ yield {"title": f"Doc {i}", "body": f"Content {i}"}
143
+
144
+ count = await client.index_documents_stream("myindex", doc_generator())
145
+
146
+ # Commit changes (required to make documents searchable)
147
+ num_docs = await client.commit("myindex")
148
+
149
+ # Force merge segments (for optimization)
150
+ num_segments = await client.force_merge("myindex")
151
+ ```
152
+
153
+ #### Searching
154
+
155
+ ```python
156
+ # Term query
157
+ results = await client.search("myindex", term=("title", "hello"), limit=10)
158
+
159
+ # Boolean query
160
+ results = await client.search("myindex", boolean={
161
+ "must": [("title", "hello")],
162
+ "should": [("body", "world")],
163
+ "must_not": [("title", "spam")],
164
+ })
165
+
166
+ # With pagination
167
+ results = await client.search("myindex", term=("title", "hello"), limit=10, offset=20)
168
+
169
+ # With field loading
170
+ results = await client.search(
171
+ "myindex",
172
+ term=("title", "hello"),
173
+ fields_to_load=["title", "body"]
174
+ )
175
+
176
+ # Access results
177
+ for hit in results.hits:
178
+ print(f"Doc {hit.doc_id}: {hit.score}")
179
+ print(f" Title: {hit.fields.get('title')}")
180
+
181
+ print(f"Total hits: {results.total_hits}")
182
+ print(f"Took: {results.took_ms}ms")
183
+ ```
184
+
185
+ #### Document Retrieval
186
+
187
+ ```python
188
+ # Get document by ID
189
+ doc = await client.get_document("myindex", doc_id=42)
190
+ if doc:
191
+ print(doc.fields["title"])
192
+ ```
193
+
194
+ ## Field Types
195
+
196
+ | Type | Python Type | Description |
197
+ | --------------- | --------------- | ------------------------------------- |
198
+ | `text` | `str` | Full-text searchable string |
199
+ | `u64` | `int` (>= 0) | Unsigned 64-bit integer |
200
+ | `i64` | `int` | Signed 64-bit integer |
201
+ | `f64` | `float` | 64-bit floating point |
202
+ | `bytes` | `bytes` | Binary data |
203
+ | `json` | `dict` / `list` | JSON object (auto-serialized) |
204
+ | `dense_vector` | `list[float]` | Dense vector for semantic search |
205
+ | `sparse_vector` | `dict` | Sparse vector with indices and values |
206
+
207
+ ## Error Handling
208
+
209
+ ```python
210
+ import grpc
211
+
212
+ try:
213
+ await client.search("nonexistent", term=("field", "value"))
214
+ except grpc.RpcError as e:
215
+ if e.code() == grpc.StatusCode.NOT_FOUND:
216
+ print("Index not found")
217
+ else:
218
+ raise
219
+ ```
220
+
221
+ ## Development
222
+
223
+ Generate protobuf stubs:
224
+
225
+ ```bash
226
+ pip install grpcio-tools
227
+ python generate_proto.py
228
+ ```
229
+
230
+ ## License
231
+
232
+ MIT
@@ -0,0 +1,208 @@
1
+ # Hermes Client
2
+
3
+ Async Python client for [Hermes](https://github.com/SpaceFrontiers/hermes) search server.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install hermes-client-python
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ```python
14
+ import asyncio
15
+ from hermes_client_python import HermesClient
16
+
17
+ async def main():
18
+ async with HermesClient("localhost:50051") as client:
19
+ # Create index with SDL schema
20
+ await client.create_index("articles", '''
21
+ index articles {
22
+ title: text indexed stored
23
+ body: text indexed stored
24
+ score: f64 stored
25
+ }
26
+ ''')
27
+
28
+ # Index documents
29
+ await client.index_documents("articles", [
30
+ {"title": "Hello World", "body": "First article", "score": 1.5},
31
+ {"title": "Goodbye World", "body": "Last article", "score": 2.0},
32
+ ])
33
+
34
+ # Commit changes
35
+ await client.commit("articles")
36
+
37
+ # Search
38
+ results = await client.search("articles", term=("title", "hello"), limit=10)
39
+ for hit in results.hits:
40
+ print(f"Doc {hit.doc_id}: score={hit.score}, fields={hit.fields}")
41
+
42
+ # Get document by ID
43
+ doc = await client.get_document("articles", 0)
44
+ print(doc.fields)
45
+
46
+ # Delete index
47
+ await client.delete_index("articles")
48
+
49
+ asyncio.run(main())
50
+ ```
51
+
52
+ ## API Reference
53
+
54
+ ### HermesClient
55
+
56
+ ```python
57
+ client = HermesClient(address="localhost:50051")
58
+ ```
59
+
60
+ #### Connection
61
+
62
+ ```python
63
+ # Using context manager (recommended)
64
+ async with HermesClient("localhost:50051") as client:
65
+ ...
66
+
67
+ # Manual connection
68
+ client = HermesClient("localhost:50051")
69
+ await client.connect()
70
+ # ... use client ...
71
+ await client.close()
72
+ ```
73
+
74
+ #### Index Management
75
+
76
+ ```python
77
+ # Create index with SDL schema
78
+ await client.create_index("myindex", '''
79
+ index myindex {
80
+ title: text indexed stored
81
+ body: text indexed stored
82
+ }
83
+ ''')
84
+
85
+ # Create index with JSON schema
86
+ await client.create_index("myindex", '''
87
+ {
88
+ "fields": [
89
+ {"name": "title", "type": "text", "indexed": true, "stored": true},
90
+ {"name": "body", "type": "text", "indexed": true, "stored": true}
91
+ ]
92
+ }
93
+ ''')
94
+
95
+ # Get index info
96
+ info = await client.get_index_info("myindex")
97
+ print(f"Documents: {info.num_docs}, Segments: {info.num_segments}")
98
+
99
+ # Delete index
100
+ await client.delete_index("myindex")
101
+ ```
102
+
103
+ #### Document Indexing
104
+
105
+ ```python
106
+ # Index multiple documents (batch)
107
+ indexed, errors = await client.index_documents("myindex", [
108
+ {"title": "Doc 1", "body": "Content 1"},
109
+ {"title": "Doc 2", "body": "Content 2"},
110
+ ])
111
+
112
+ # Index single document
113
+ await client.index_document("myindex", {"title": "Doc", "body": "Content"})
114
+
115
+ # Stream documents (for large datasets)
116
+ async def doc_generator():
117
+ for i in range(10000):
118
+ yield {"title": f"Doc {i}", "body": f"Content {i}"}
119
+
120
+ count = await client.index_documents_stream("myindex", doc_generator())
121
+
122
+ # Commit changes (required to make documents searchable)
123
+ num_docs = await client.commit("myindex")
124
+
125
+ # Force merge segments (for optimization)
126
+ num_segments = await client.force_merge("myindex")
127
+ ```
128
+
129
+ #### Searching
130
+
131
+ ```python
132
+ # Term query
133
+ results = await client.search("myindex", term=("title", "hello"), limit=10)
134
+
135
+ # Boolean query
136
+ results = await client.search("myindex", boolean={
137
+ "must": [("title", "hello")],
138
+ "should": [("body", "world")],
139
+ "must_not": [("title", "spam")],
140
+ })
141
+
142
+ # With pagination
143
+ results = await client.search("myindex", term=("title", "hello"), limit=10, offset=20)
144
+
145
+ # With field loading
146
+ results = await client.search(
147
+ "myindex",
148
+ term=("title", "hello"),
149
+ fields_to_load=["title", "body"]
150
+ )
151
+
152
+ # Access results
153
+ for hit in results.hits:
154
+ print(f"Doc {hit.doc_id}: {hit.score}")
155
+ print(f" Title: {hit.fields.get('title')}")
156
+
157
+ print(f"Total hits: {results.total_hits}")
158
+ print(f"Took: {results.took_ms}ms")
159
+ ```
160
+
161
+ #### Document Retrieval
162
+
163
+ ```python
164
+ # Get document by ID
165
+ doc = await client.get_document("myindex", doc_id=42)
166
+ if doc:
167
+ print(doc.fields["title"])
168
+ ```
169
+
170
+ ## Field Types
171
+
172
+ | Type | Python Type | Description |
173
+ | --------------- | --------------- | ------------------------------------- |
174
+ | `text` | `str` | Full-text searchable string |
175
+ | `u64` | `int` (>= 0) | Unsigned 64-bit integer |
176
+ | `i64` | `int` | Signed 64-bit integer |
177
+ | `f64` | `float` | 64-bit floating point |
178
+ | `bytes` | `bytes` | Binary data |
179
+ | `json` | `dict` / `list` | JSON object (auto-serialized) |
180
+ | `dense_vector` | `list[float]` | Dense vector for semantic search |
181
+ | `sparse_vector` | `dict` | Sparse vector with indices and values |
182
+
183
+ ## Error Handling
184
+
185
+ ```python
186
+ import grpc
187
+
188
+ try:
189
+ await client.search("nonexistent", term=("field", "value"))
190
+ except grpc.RpcError as e:
191
+ if e.code() == grpc.StatusCode.NOT_FOUND:
192
+ print("Index not found")
193
+ else:
194
+ raise
195
+ ```
196
+
197
+ ## Development
198
+
199
+ Generate protobuf stubs:
200
+
201
+ ```bash
202
+ pip install grpcio-tools
203
+ python generate_proto.py
204
+ ```
205
+
206
+ ## License
207
+
208
+ MIT
@@ -0,0 +1,48 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "hermes-client-python"
7
+ version = "1.0.4"
8
+ description = "Async Python client for Hermes search server"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.10"
12
+ authors = [
13
+ { name = "izihawa" }
14
+ ]
15
+ keywords = ["search", "full-text-search", "grpc", "async"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Intended Audience :: Developers",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Programming Language :: Python :: 3.13",
25
+ "Topic :: Database :: Database Engines/Servers",
26
+ "Topic :: Text Processing :: Indexing",
27
+ ]
28
+ dependencies = [
29
+ "grpcio>=1.76.0",
30
+ "protobuf>=6.33.4",
31
+ ]
32
+
33
+ [project.urls]
34
+ Homepage = "https://github.com/SpaceFrontiers/hermes"
35
+ Repository = "https://github.com/SpaceFrontiers/hermes"
36
+
37
+ [dependency-groups]
38
+ dev = [
39
+ "grpcio-tools>=1.76.0",
40
+ ]
41
+
42
+ [tool.hatch.build.targets.wheel]
43
+ packages = ["src/hermes_client_python"]
44
+
45
+ [tool.hatch.build.targets.sdist]
46
+ include = [
47
+ "/src",
48
+ ]
@@ -0,0 +1,110 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: hermes.proto
5
+ # Protobuf Python Version: 6.31.1
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 6,
15
+ 31,
16
+ 1,
17
+ '',
18
+ 'hermes.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+
26
+
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0chermes.proto\x12\x06hermes\"\xa2\x01\n\x05Query\x12!\n\x04term\x18\x01 \x01(\x0b\x32\x11.hermes.TermQueryH\x00\x12\'\n\x07\x62oolean\x18\x02 \x01(\x0b\x32\x14.hermes.BooleanQueryH\x00\x12#\n\x05\x62oost\x18\x03 \x01(\x0b\x32\x12.hermes.BoostQueryH\x00\x12\x1f\n\x03\x61ll\x18\x04 \x01(\x0b\x32\x10.hermes.AllQueryH\x00\x42\x07\n\x05query\"(\n\tTermQuery\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04term\x18\x02 \x01(\t\"k\n\x0c\x42ooleanQuery\x12\x1b\n\x04must\x18\x01 \x03(\x0b\x32\r.hermes.Query\x12\x1d\n\x06should\x18\x02 \x03(\x0b\x32\r.hermes.Query\x12\x1f\n\x08must_not\x18\x03 \x03(\x0b\x32\r.hermes.Query\"9\n\nBoostQuery\x12\x1c\n\x05query\x18\x01 \x01(\x0b\x32\r.hermes.Query\x12\r\n\x05\x62oost\x18\x02 \x01(\x02\"\n\n\x08\x41llQuery\"x\n\rSearchRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x1c\n\x05query\x18\x02 \x01(\x0b\x32\r.hermes.Query\x12\r\n\x05limit\x18\x03 \x01(\r\x12\x0e\n\x06offset\x18\x04 \x01(\r\x12\x16\n\x0e\x66ields_to_load\x18\x05 \x03(\t\"\x9c\x01\n\tSearchHit\x12\x0e\n\x06\x64oc_id\x18\x01 \x01(\r\x12\r\n\x05score\x18\x02 \x01(\x02\x12-\n\x06\x66ields\x18\x03 \x03(\x0b\x32\x1d.hermes.SearchHit.FieldsEntry\x1a\x41\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.hermes.FieldValue:\x02\x38\x01\"\xdb\x01\n\nFieldValue\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x12\r\n\x03u64\x18\x02 \x01(\x04H\x00\x12\r\n\x03i64\x18\x03 \x01(\x03H\x00\x12\r\n\x03\x66\x36\x34\x18\x04 \x01(\x01H\x00\x12\x15\n\x0b\x62ytes_value\x18\x05 \x01(\x0cH\x00\x12-\n\rsparse_vector\x18\x06 \x01(\x0b\x32\x14.hermes.SparseVectorH\x00\x12+\n\x0c\x64\x65nse_vector\x18\x07 \x01(\x0b\x32\x13.hermes.DenseVectorH\x00\x12\x14\n\njson_value\x18\x08 \x01(\tH\x00\x42\x07\n\x05value\"/\n\x0cSparseVector\x12\x0f\n\x07indices\x18\x01 \x03(\r\x12\x0e\n\x06values\x18\x02 \x03(\x02\"\x1d\n\x0b\x44\x65nseVector\x12\x0e\n\x06values\x18\x01 \x03(\x02\"V\n\x0eSearchResponse\x12\x1f\n\x04hits\x18\x01 \x03(\x0b\x32\x11.hermes.SearchHit\x12\x12\n\ntotal_hits\x18\x02 \x01(\r\x12\x0f\n\x07took_ms\x18\x03 \x01(\x04\"8\n\x12GetDocumentRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x0e\n\x06\x64oc_id\x18\x02 \x01(\r\"\x91\x01\n\x13GetDocumentResponse\x12\x37\n\x06\x66ields\x18\x01 \x03(\x0b\x32\'.hermes.GetDocumentResponse.FieldsEntry\x1a\x41\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.hermes.FieldValue:\x02\x38\x01\")\n\x13GetIndexInfoRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\"b\n\x14GetIndexInfoResponse\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x10\n\x08num_docs\x18\x02 \x01(\r\x12\x14\n\x0cnum_segments\x18\x03 \x01(\r\x12\x0e\n\x06schema\x18\x04 \x01(\t\"8\n\x12\x43reateIndexRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t\"&\n\x13\x43reateIndexResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"\x85\x01\n\rNamedDocument\x12\x31\n\x06\x66ields\x18\x01 \x03(\x0b\x32!.hermes.NamedDocument.FieldsEntry\x1a\x41\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.hermes.FieldValue:\x02\x38\x01\"Z\n\x1a\x42\x61tchIndexDocumentsRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12(\n\tdocuments\x18\x02 \x03(\x0b\x32\x15.hermes.NamedDocument\"I\n\x1b\x42\x61tchIndexDocumentsResponse\x12\x15\n\rindexed_count\x18\x01 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\x02 \x01(\r\"\xa7\x01\n\x14IndexDocumentRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x38\n\x06\x66ields\x18\x02 \x03(\x0b\x32(.hermes.IndexDocumentRequest.FieldsEntry\x1a\x41\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.hermes.FieldValue:\x02\x38\x01\"/\n\x16IndexDocumentsResponse\x12\x15\n\rindexed_count\x18\x01 \x01(\r\"#\n\rCommitRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\"3\n\x0e\x43ommitResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x10\n\x08num_docs\x18\x02 \x01(\r\"\'\n\x11\x46orceMergeRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\";\n\x12\x46orceMergeResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x14\n\x0cnum_segments\x18\x02 \x01(\r\"(\n\x12\x44\x65leteIndexRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\"&\n\x13\x44\x65leteIndexResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x32\xdb\x01\n\rSearchService\x12\x37\n\x06Search\x12\x15.hermes.SearchRequest\x1a\x16.hermes.SearchResponse\x12\x46\n\x0bGetDocument\x12\x1a.hermes.GetDocumentRequest\x1a\x1b.hermes.GetDocumentResponse\x12I\n\x0cGetIndexInfo\x12\x1b.hermes.GetIndexInfoRequest\x1a\x1c.hermes.GetIndexInfoResponse2\xce\x03\n\x0cIndexService\x12\x46\n\x0b\x43reateIndex\x12\x1a.hermes.CreateIndexRequest\x1a\x1b.hermes.CreateIndexResponse\x12P\n\x0eIndexDocuments\x12\x1c.hermes.IndexDocumentRequest\x1a\x1e.hermes.IndexDocumentsResponse(\x01\x12^\n\x13\x42\x61tchIndexDocuments\x12\".hermes.BatchIndexDocumentsRequest\x1a#.hermes.BatchIndexDocumentsResponse\x12\x37\n\x06\x43ommit\x12\x15.hermes.CommitRequest\x1a\x16.hermes.CommitResponse\x12\x43\n\nForceMerge\x12\x19.hermes.ForceMergeRequest\x1a\x1a.hermes.ForceMergeResponse\x12\x46\n\x0b\x44\x65leteIndex\x12\x1a.hermes.DeleteIndexRequest\x1a\x1b.hermes.DeleteIndexResponseb\x06proto3')
28
+
29
+ _globals = globals()
30
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'hermes_pb2', _globals)
32
+ if not _descriptor._USE_C_DESCRIPTORS:
33
+ DESCRIPTOR._loaded_options = None
34
+ _globals['_SEARCHHIT_FIELDSENTRY']._loaded_options = None
35
+ _globals['_SEARCHHIT_FIELDSENTRY']._serialized_options = b'8\001'
36
+ _globals['_GETDOCUMENTRESPONSE_FIELDSENTRY']._loaded_options = None
37
+ _globals['_GETDOCUMENTRESPONSE_FIELDSENTRY']._serialized_options = b'8\001'
38
+ _globals['_NAMEDDOCUMENT_FIELDSENTRY']._loaded_options = None
39
+ _globals['_NAMEDDOCUMENT_FIELDSENTRY']._serialized_options = b'8\001'
40
+ _globals['_INDEXDOCUMENTREQUEST_FIELDSENTRY']._loaded_options = None
41
+ _globals['_INDEXDOCUMENTREQUEST_FIELDSENTRY']._serialized_options = b'8\001'
42
+ _globals['_QUERY']._serialized_start=25
43
+ _globals['_QUERY']._serialized_end=187
44
+ _globals['_TERMQUERY']._serialized_start=189
45
+ _globals['_TERMQUERY']._serialized_end=229
46
+ _globals['_BOOLEANQUERY']._serialized_start=231
47
+ _globals['_BOOLEANQUERY']._serialized_end=338
48
+ _globals['_BOOSTQUERY']._serialized_start=340
49
+ _globals['_BOOSTQUERY']._serialized_end=397
50
+ _globals['_ALLQUERY']._serialized_start=399
51
+ _globals['_ALLQUERY']._serialized_end=409
52
+ _globals['_SEARCHREQUEST']._serialized_start=411
53
+ _globals['_SEARCHREQUEST']._serialized_end=531
54
+ _globals['_SEARCHHIT']._serialized_start=534
55
+ _globals['_SEARCHHIT']._serialized_end=690
56
+ _globals['_SEARCHHIT_FIELDSENTRY']._serialized_start=625
57
+ _globals['_SEARCHHIT_FIELDSENTRY']._serialized_end=690
58
+ _globals['_FIELDVALUE']._serialized_start=693
59
+ _globals['_FIELDVALUE']._serialized_end=912
60
+ _globals['_SPARSEVECTOR']._serialized_start=914
61
+ _globals['_SPARSEVECTOR']._serialized_end=961
62
+ _globals['_DENSEVECTOR']._serialized_start=963
63
+ _globals['_DENSEVECTOR']._serialized_end=992
64
+ _globals['_SEARCHRESPONSE']._serialized_start=994
65
+ _globals['_SEARCHRESPONSE']._serialized_end=1080
66
+ _globals['_GETDOCUMENTREQUEST']._serialized_start=1082
67
+ _globals['_GETDOCUMENTREQUEST']._serialized_end=1138
68
+ _globals['_GETDOCUMENTRESPONSE']._serialized_start=1141
69
+ _globals['_GETDOCUMENTRESPONSE']._serialized_end=1286
70
+ _globals['_GETDOCUMENTRESPONSE_FIELDSENTRY']._serialized_start=625
71
+ _globals['_GETDOCUMENTRESPONSE_FIELDSENTRY']._serialized_end=690
72
+ _globals['_GETINDEXINFOREQUEST']._serialized_start=1288
73
+ _globals['_GETINDEXINFOREQUEST']._serialized_end=1329
74
+ _globals['_GETINDEXINFORESPONSE']._serialized_start=1331
75
+ _globals['_GETINDEXINFORESPONSE']._serialized_end=1429
76
+ _globals['_CREATEINDEXREQUEST']._serialized_start=1431
77
+ _globals['_CREATEINDEXREQUEST']._serialized_end=1487
78
+ _globals['_CREATEINDEXRESPONSE']._serialized_start=1489
79
+ _globals['_CREATEINDEXRESPONSE']._serialized_end=1527
80
+ _globals['_NAMEDDOCUMENT']._serialized_start=1530
81
+ _globals['_NAMEDDOCUMENT']._serialized_end=1663
82
+ _globals['_NAMEDDOCUMENT_FIELDSENTRY']._serialized_start=625
83
+ _globals['_NAMEDDOCUMENT_FIELDSENTRY']._serialized_end=690
84
+ _globals['_BATCHINDEXDOCUMENTSREQUEST']._serialized_start=1665
85
+ _globals['_BATCHINDEXDOCUMENTSREQUEST']._serialized_end=1755
86
+ _globals['_BATCHINDEXDOCUMENTSRESPONSE']._serialized_start=1757
87
+ _globals['_BATCHINDEXDOCUMENTSRESPONSE']._serialized_end=1830
88
+ _globals['_INDEXDOCUMENTREQUEST']._serialized_start=1833
89
+ _globals['_INDEXDOCUMENTREQUEST']._serialized_end=2000
90
+ _globals['_INDEXDOCUMENTREQUEST_FIELDSENTRY']._serialized_start=625
91
+ _globals['_INDEXDOCUMENTREQUEST_FIELDSENTRY']._serialized_end=690
92
+ _globals['_INDEXDOCUMENTSRESPONSE']._serialized_start=2002
93
+ _globals['_INDEXDOCUMENTSRESPONSE']._serialized_end=2049
94
+ _globals['_COMMITREQUEST']._serialized_start=2051
95
+ _globals['_COMMITREQUEST']._serialized_end=2086
96
+ _globals['_COMMITRESPONSE']._serialized_start=2088
97
+ _globals['_COMMITRESPONSE']._serialized_end=2139
98
+ _globals['_FORCEMERGEREQUEST']._serialized_start=2141
99
+ _globals['_FORCEMERGEREQUEST']._serialized_end=2180
100
+ _globals['_FORCEMERGERESPONSE']._serialized_start=2182
101
+ _globals['_FORCEMERGERESPONSE']._serialized_end=2241
102
+ _globals['_DELETEINDEXREQUEST']._serialized_start=2243
103
+ _globals['_DELETEINDEXREQUEST']._serialized_end=2283
104
+ _globals['_DELETEINDEXRESPONSE']._serialized_start=2285
105
+ _globals['_DELETEINDEXRESPONSE']._serialized_end=2323
106
+ _globals['_SEARCHSERVICE']._serialized_start=2326
107
+ _globals['_SEARCHSERVICE']._serialized_end=2545
108
+ _globals['_INDEXSERVICE']._serialized_start=2548
109
+ _globals['_INDEXSERVICE']._serialized_end=3010
110
+ # @@protoc_insertion_point(module_scope)