Change the ef construction from default 100 to 33

This commit is contained in:
Kerollmops
2025-07-21 18:09:25 +02:00
parent 4b7d88e2f4
commit b228b2efd9
3 changed files with 4 additions and 3 deletions

View File

@ -87,7 +87,7 @@ rhai = { version = "1.22.2", features = [
"no_time",
"sync",
] }
hannoy = { git = "https://github.com/nnethercott/hannoy", branch = "incremental-indexing" }
hannoy = { git = "https://github.com/kerollmops/hannoy", branch = "expose-private-types" }
rand = "0.8.5"
tracing = "0.1.41"
ureq = { version = "2.12.1", features = ["json"] }

View File

@ -147,7 +147,7 @@ impl HannoyWrapper {
if self.quantized {
let writer = hannoy::Writer::new(self.quantized_db(), index, dimension);
if writer.need_build(wtxn)? {
writer.builder(rng).build::<16, 32>(wtxn)?
writer.builder(rng).ef_construction(33).build::<16, 32>(wtxn)?
} else if writer.is_empty(wtxn)? {
continue;
}
@ -173,6 +173,7 @@ impl HannoyWrapper {
.available_memory(hannoy_memory.unwrap_or(usize::MAX))
// .progress(|step| progress.update_progress_from_hannoy(step))
// .cancel(cancel)
.ef_construction(33)
.build::<16, 32>(wtxn)?;
} else if writer.is_empty(wtxn)? {
continue;