mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 16:51:01 +00:00
doc: Update the README for the new CLI
This commit is contained in:
@ -10,7 +10,7 @@ use structopt::StructOpt;
|
||||
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[structopt(name = "raptor-cli", about = "A command line to do raptor operations.")]
|
||||
enum Commands {
|
||||
enum Command {
|
||||
#[cfg(feature = "index")]
|
||||
/// Index files of different format.
|
||||
#[structopt(name = "index")]
|
||||
@ -23,10 +23,10 @@ enum Commands {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let ret = match Commands::from_args() {
|
||||
let ret = match Command::from_args() {
|
||||
|
||||
#[cfg(feature = "index")]
|
||||
Commands::Index(i) => match i {
|
||||
Command::Index(i) => match i {
|
||||
|
||||
#[cfg(feature = "index-jsonlines")]
|
||||
index::CommandIndex::JsonLines(command) => index::jsonlines_feature::json_lines(command),
|
||||
@ -36,7 +36,7 @@ fn main() {
|
||||
},
|
||||
|
||||
#[cfg(feature = "serve")]
|
||||
Commands::Serve(s) => match s {
|
||||
Command::Serve(s) => match s {
|
||||
|
||||
#[cfg(feature = "serve-http")]
|
||||
serve::CommandServe::Http(command) => serve::http_feature::http(command),
|
||||
|
@ -21,6 +21,9 @@ struct Document<'a> {
|
||||
image: &'a str,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct SearchQuery { q: String }
|
||||
|
||||
pub struct HttpServer {
|
||||
listen_addr: SocketAddr,
|
||||
common_words: Arc<CommonWords>,
|
||||
@ -28,9 +31,6 @@ pub struct HttpServer {
|
||||
db: Arc<DB>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct SearchQuery { q: String }
|
||||
|
||||
impl HttpServer {
|
||||
pub fn from_command(command: CommandHttp) -> io::Result<HttpServer> {
|
||||
let common_words = common_words::from_file(command.stop_words)?;
|
||||
|
Reference in New Issue
Block a user