fet: Move meilidb example into the meilidb workspace

This commit is contained in:
Clément Renault 2019-02-26 13:50:46 +01:00
parent 9dcc6e90c9
commit bb86997af2
No known key found for this signature in database
GPG Key ID: 0151CDAB43460DAE
3 changed files with 2 additions and 4 deletions

View File

@ -13,7 +13,6 @@ use serde_derive::{Serialize, Deserialize};
use structopt::StructOpt;
use meilidb::database::{Database, Schema};
use meilidb::tokenizer::DefaultBuilder;
#[derive(Debug, StructOpt)]
pub struct Opt {
@ -63,7 +62,6 @@ fn index(
let mut end_of_file = false;
while !end_of_file {
let tokenizer_builder = DefaultBuilder::new();
let mut update = database.start_update("default")?;
loop {
@ -78,7 +76,7 @@ fn index(
}
};
update.update_document(&document, &tokenizer_builder, &stop_words)?;
update.update_document(&document, &stop_words)?;
print!("\rindexing document {}", i);
i += 1;

View File

@ -11,10 +11,10 @@ use std::error::Error;
use hashbrown::{HashMap, HashSet};
use termcolor::{Color, ColorChoice, ColorSpec, StandardStream, WriteColor};
use structopt::StructOpt;
use meilidb_core::Match;
use meilidb::database::schema::SchemaAttr;
use meilidb::database::Database;
use meilidb::Match;
#[derive(Debug, StructOpt)]
pub struct Opt {