1
0
mirror of https://github.com/osmarks/meme-search-engine.git synced 2025-02-23 06:20:04 +00:00

minor tweaks

This commit is contained in:
osmarks 2025-01-11 12:19:10 +00:00
parent 44ffe80102
commit 0a196694b1
2 changed files with 2 additions and 5 deletions

View File

@ -41,7 +41,7 @@ fn main() -> Result<()> {
}
let mut config = IndexBuildConfig {
r: 64,
r: 40,
l: 200,
maxc: 750,
alpha: 65300

View File

@ -209,15 +209,12 @@ fn main() -> Result<()> {
scratch.visited_list.sort_by_key(|x| -x.1);
for (i, (id, distance, url, shards)) in scratch.visited_list.iter().take(20).enumerate() {
if args.verbose {
println!("index scan: {} {} {} {:?}", id, distance, url, shards);
};
let found_id = match matches.binary_search(&(*id, 0)) {
Ok(pos) => pos,
Err(pos) => pos
};
if args.verbose {
println!("rank {}", matches[found_id].1);
println!("index scan: {} {} {} {:?}; rank {}", id, distance, url, shards, matches[found_id].1 + 1);
};
top_ranks[i] = std::cmp::min(top_ranks[i], matches[found_id].1);
}