mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 01:28:27 +08:00
fix the case that knng is not full (#6308)
Signed-off-by: shengjun.li <shengjun.li@zilliz.com>
This commit is contained in:
parent
c43938cd8b
commit
1f42b4ec9d
@ -134,6 +134,12 @@ NSG_NM::BuildAll(const DatasetPtr& dataset_ptr, const Config& config) {
|
|||||||
preprocess_index->GenGraph(raw_data, k, knng, config);
|
preprocess_index->GenGraph(raw_data, k, knng, config);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
for (size_t i = 0; i < knng.size(); i++) {
|
||||||
|
while (knng[i].size() > 0 && knng[i].back() == -1) {
|
||||||
|
knng[i].resize(knng[i].size() - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl::BuildParams b_params;
|
impl::BuildParams b_params;
|
||||||
b_params.candidate_pool_size = config[IndexParams::candidate];
|
b_params.candidate_pool_size = config[IndexParams::candidate];
|
||||||
b_params.out_degree = config[IndexParams::out_degree];
|
b_params.out_degree = config[IndexParams::out_degree];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user