Skip to content

Commit 92e0c04

Browse files
EF made a bit bigger, will need to parametrise better.
1 parent 2e76905 commit 92e0c04

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/indexer.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ pub fn search(p: &Point, num: usize, hnsw: &HnswIndex) -> Result<Vec<PointQuery>
192192
.take(num)
193193
.collect();
194194
let mut searcher = Searcher::default();
195-
hnsw.nearest(p, num, &mut searcher, &mut output);
195+
let ef = num.max(100);
196+
hnsw.nearest(p, ef, &mut searcher, &mut output);
196197
let mut points = Vec::with_capacity(num);
197198
for elt in output {
198199
points.push(PointQuery {

0 commit comments

Comments
 (0)