Don't use heuristic selection for test

This commit is contained in:
Dirkjan Ochtman 2021-01-12 13:31:16 +01:00
parent c1e5acf35c
commit d265ef7c29
1 changed files with 2 additions and 9 deletions

View File

@ -4,7 +4,7 @@ use ordered_float::OrderedFloat;
use rand::rngs::{StdRng, ThreadRng}; use rand::rngs::{StdRng, ThreadRng};
use rand::{Rng, SeedableRng}; use rand::{Rng, SeedableRng};
use instant_distance::{Heuristic, Hnsw, Point as _, PointId, Search}; use instant_distance::{Hnsw, Point as _, PointId, Search};
#[test] #[test]
fn basic() { fn basic() {
@ -46,14 +46,7 @@ fn randomized() {
} }
} }
let (hnsw, pids) = Hnsw::<Point>::builder() let (hnsw, pids) = Hnsw::<Point>::builder().seed(seed).build(&points);
.seed(seed)
.select_heuristic(Heuristic {
extend_candidates: false,
keep_pruned: true,
})
.build(&points);
let mut search = Search::default(); let mut search = Search::default();
let mut results = vec![PointId::default(); 100]; let mut results = vec![PointId::default(); 100];
let found = hnsw.search(&query, &mut results, &mut search); let found = hnsw.search(&query, &mut results, &mut search);