Skip to content

Commit

Permalink
update to tantivy 0.6.1
Browse files Browse the repository at this point in the history
* change from create() to create_in_dir()

* fix issue quickwit-oss#12 "Field name must match the pattern"
  • Loading branch information
nocduro committed Jul 22, 2018
1 parent 77b2440 commit df76271
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fn prompt_input<P: Fn(&str) -> Result<(), String>>(prompt_text: &str, predicate:
io::stdout().flush().unwrap();
let mut buffer = String::new();
io::stdin().read_line(&mut buffer).ok().expect("Failed to read line");
let answer = buffer.trim_right_matches("\n").to_string();
let answer = buffer.trim_right().to_string();
match predicate(&answer) {
Ok(()) => {
return answer;
Expand Down Expand Up @@ -145,7 +145,7 @@ fn run_new(directory: PathBuf) -> tantivy::Result<()> {
let schema = schema_builder.build();
let schema_json = format!("{}", serde_json::to_string_pretty(&schema).unwrap());
println!("\n{}\n", Style::new().fg(Green).paint(schema_json));
Index::create(&directory, schema)?;
Index::create_in_dir(&directory, schema)?;
Ok(())
}

0 comments on commit df76271

Please sign in to comment.