Enforce API boundary between Hnsw and Search
This commit is contained in:
parent
f66bad132e
commit
ecdce08196
|
@ -356,8 +356,9 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let found = min(search.nearest.len(), out.len());
|
let nearest = search.select_simple();
|
||||||
for (i, candidate) in search.nearest[..found].iter().enumerate() {
|
let found = min(nearest.len(), out.len());
|
||||||
|
for (i, candidate) in nearest.iter().take(found).enumerate() {
|
||||||
out[i] = candidate.pid;
|
out[i] = candidate.pid;
|
||||||
}
|
}
|
||||||
found
|
found
|
||||||
|
|
Loading…
Reference in New Issue