feat: introduce fuzzy search for native indexer (#14109)

This commit is contained in:
DarkSky
2025-12-25 04:40:23 +08:00
committed by GitHub
parent b6dc68eddf
commit e8693a3a25
24 changed files with 237 additions and 537 deletions

View File

@@ -85,7 +85,7 @@ fn convert_to_markdown() -> impl Iterator<Item = String> {
let (changes_dur_secs, changes_err_secs) = process_duration(&changes_duration)?;
let diff = -(1.0 - changes_dur_secs / base_dur_secs) * 100.0;
difference = format!("{:+.2}%", diff);
difference = format!("{diff:+.2}%");
if is_significant(
changes_dur_secs,
@@ -93,7 +93,7 @@ fn convert_to_markdown() -> impl Iterator<Item = String> {
base_dur_secs,
base_err_secs,
) {
difference = format!("**{}**", difference);
difference = format!("**{difference}**");
}
}
@@ -128,7 +128,7 @@ fn main() {
];
for line in headers.into_iter().chain(convert_to_markdown()) {
println!("{}", line);
println!("{line}");
}
println!("</details>");
}

View File

@@ -35,7 +35,7 @@ fn load_path(path: &str) -> Result<Vec<Vec<u8>>, Error> {
paths.sort();
for path in paths {
println!("read {:?}", path);
println!("read {path:?}");
updates.push(read(path)?);
}
Ok(updates)
@@ -66,7 +66,7 @@ fn jwst_merge(path: &str) {
let history = doc.history().parse_store(Default::default());
println!("history: {:?}", ts.elapsed());
for history in history.iter().take(100) {
println!("history: {:?}", history);
println!("history: {history:?}");
}
doc.gc().unwrap();