|
15 | 15 |
|
16 | 16 | ### What is the hlquery C++ API? |
17 | 17 |
|
18 | | -The hlquery C++ API is the official C++ client for [hlquery](https://github.com/hlquery/hlquery). It wraps the server's HTTP/JSON interface in a small typed client with response helpers, auth support, SQL helpers, system helpers, and SAM support. |
| 18 | +The hlquery C++ API is the official C++ client for [hlquery](https://github.com/hlquery/hlquery). It wraps the server's HTTP/JSON interface in a small typed client with response helpers, auth support, SQL helpers, and system helpers. |
19 | 19 |
|
20 | 20 | It is intended for native services, command-line tools, and applications that want direct hlquery access without hand-rolling HTTP calls. |
21 | 21 |
|
22 | 22 | ### Why use it? |
23 | 23 |
|
24 | | -Use the C++ client when your application already lives close to hlquery and you want the search layer to feel native instead of like a pile of hand-built HTTP calls. The library keeps request setup, auth, response parsing, and endpoint routing in one place, so application code can work with collections, documents, search, SQL, system routes, and SAM through one small client surface. |
| 24 | +Use the C++ client when your application already lives close to hlquery and you want the search layer to feel native instead of like a pile of hand-built HTTP calls. The library keeps request setup, auth, response parsing, and endpoint routing in one place, so application code can work with collections, documents, search, SQL, and system routes through one small client surface. |
25 | 25 |
|
26 | 26 | It is still close to the server API. You get typed helpers for the common paths, but the raw request helper remains available for custom module routes or newer endpoints that have not yet grown a dedicated wrapper. That makes it useful for production services that want a stable integration point without losing access to hlquery's full HTTP surface. |
27 | 27 |
|
@@ -86,27 +86,6 @@ client.setAuthToken("your_api_key_here", "api-key"); |
86 | 86 | client.clearAuth(); |
87 | 87 | ``` |
88 | 88 |
|
89 | | -### SAM |
90 | | -
|
91 | | -Use the SAM helpers to inspect indexing status and run SAM search: |
92 | | -
|
93 | | -SAM is separate from vector search. It performs term and intent-style lookup, not vector similarity search. |
94 | | -
|
95 | | -```cpp |
96 | | -hlquery::Client client("http://localhost:9200"); |
97 | | -
|
98 | | -auto sam = client.sam(); |
99 | | -auto status = sam->status("music"); |
100 | | -auto history = sam->history("music", 5); |
101 | | -auto results = sam->search("music", "queen of pop", { |
102 | | - {"limit", "10"} |
103 | | -}); |
104 | | -
|
105 | | -std::cout << status.getBody().dump(2) << std::endl; |
106 | | -std::cout << history.getBody().dump(2) << std::endl; |
107 | | -std::cout << results.getBody().dump(2) << std::endl; |
108 | | -``` |
109 | | - |
110 | 89 | ### System |
111 | 90 |
|
112 | 91 | Use the system helper for operational routes that were added after the initial C++ client surface: |
@@ -162,4 +141,3 @@ auto response = client.executeRequest( |
162 | 141 | } |
163 | 142 | ); |
164 | 143 | ``` |
165 | | - |
0 commit comments