@@ -66,20 +66,14 @@ enum Commands {
66
66
} ,
67
67
68
68
/// Deploy the search server.
69
- SearchServer {
70
- config_path : String ,
71
- } ,
69
+ SearchServer { config_path : String } ,
72
70
73
71
/// Deploy the entity search server.
74
- EntitySearchServer {
75
- config_path : String ,
76
- } ,
72
+ EntitySearchServer { config_path : String } ,
77
73
78
74
/// Deploy the json http api. The api interacts with
79
75
/// the search servers, webgraph servers etc. to provide the necesarry functionality.
80
- Api {
81
- config_path : String ,
82
- } ,
76
+ Api { config_path : String } ,
83
77
84
78
/// Deploy the crawler.
85
79
Crawler {
@@ -102,23 +96,19 @@ enum Commands {
102
96
ml : bool ,
103
97
} ,
104
98
105
- // Commands for the live index.
99
+ /// Commands for the live index.
106
100
LiveIndex {
107
101
#[ clap( subcommand) ]
108
102
options : LiveIndex ,
109
103
} ,
110
104
111
- // Build spell correction model.
112
- WebSpell {
113
- config_path : String ,
114
- } ,
105
+ /// Build spell correction model.
106
+ WebSpell { config_path : String } ,
115
107
116
- // Compute statistics for sites.
117
- SiteStats {
118
- config_path : String ,
119
- } ,
108
+ /// Compute statistics for sites.
109
+ SiteStats { config_path : String } ,
120
110
121
- // Commands to compute distributed graph algorithms.
111
+ /// Commands to compute distributed graph algorithms.
122
112
Ampc {
123
113
#[ clap( subcommand) ]
124
114
options : AmpcOptions ,
@@ -155,20 +145,22 @@ enum AmpcOptions {
155
145
156
146
#[ derive( Subcommand ) ]
157
147
enum AdminOptions {
158
- Init {
159
- host : SocketAddr ,
160
- } ,
148
+ /// Create the admin config file. Run this before any other admin commands so the client knows where to connect.
149
+ Init { host : SocketAddr } ,
150
+
151
+ /// Print the reachable cluster members and which service they are running.
161
152
Status ,
162
- TopKeyphrases {
163
- top : usize ,
164
- } ,
165
153
154
+ /// Export the top most common phrases in the index.
155
+ TopKeyphrases { top : usize } ,
156
+
157
+ /// Get statistics about the index.
166
158
#[ clap( subcommand) ]
167
- Index ( AdminIndexOptions ) ,
159
+ IndexStats ( AdminIndexStatsOptions ) ,
168
160
}
169
161
170
162
#[ derive( Subcommand ) ]
171
- enum AdminIndexOptions {
163
+ enum AdminIndexStatsOptions {
172
164
/// Get the size of the index
173
165
Size ,
174
166
}
@@ -251,9 +243,7 @@ enum WebgraphOptions {
251
243
#[ derive( Subcommand ) ]
252
244
enum IndexingOptions {
253
245
/// Create the search index.
254
- Search {
255
- config_path : String ,
256
- } ,
246
+ Search { config_path : String } ,
257
247
258
248
/// Merge multiple search indexes into a single index.
259
249
MergeSearch {
@@ -267,10 +257,8 @@ enum IndexingOptions {
267
257
output_path : String ,
268
258
} ,
269
259
270
- // Create an index of canonical urls.
271
- Canonical {
272
- config_path : String ,
273
- } ,
260
+ /// Create an index of canonical urls.
261
+ Canonical { config_path : String } ,
274
262
}
275
263
276
264
fn load_toml_config < T : DeserializeOwned , P : AsRef < Path > > ( path : P ) -> T {
@@ -511,8 +499,8 @@ fn main() -> Result<()> {
511
499
. block_on ( entrypoint:: admin:: top_keyphrases ( top) ) ?;
512
500
}
513
501
514
- AdminOptions :: Index ( index_options) => match index_options {
515
- AdminIndexOptions :: Size => {
502
+ AdminOptions :: IndexStats ( index_options) => match index_options {
503
+ AdminIndexStatsOptions :: Size => {
516
504
tokio:: runtime:: Builder :: new_current_thread ( )
517
505
. enable_all ( )
518
506
. build ( ) ?
0 commit comments