diff --git a/CHANGELOG.md b/CHANGELOG.md index a85d7a2bbfa15938e38e9fffcc136b69704ffdc7..1cefe1fb6ecca87ab18041a80ec42c8083e3166a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ Please mark all change in change log and use the issue from GitHub - \#990 Check gpu resources setting when assign repeated value - \#995 Table count set to 0 if no tables found - \#1010 Improve error message when offset or page_size is equal 0 +- \#1022 Check if partition name is valid +- \#1028 check if table exists when show partitions +- \#1029 check if table exists when try to delete partition +- \#1066 optimize http insert and search speed - \#1022 Check if partition name is legal - \#1028 Check if table exists when show partitions - \#1029 Check if table exists when try to delete partition @@ -36,6 +40,7 @@ Please mark all change in change log and use the issue from GitHub - \#1507 set_config for insert_buffer_size is wrong - \#1510 Add set interfaces for WAL configurations - \#1511 Fix big integer cannot pass to server correctly +- \#1517 result is not correct when search vectors in multi partition, index type is RNSG - \#1518 Table count did not match after deleting vectors and compact - \#1521 Make cache_insert_data take effect in-service - \#1525 Add setter API for config preload_table diff --git a/core/src/index/knowhere/knowhere/index/vector_index/nsg/NSG.cpp b/core/src/index/knowhere/knowhere/index/vector_index/nsg/NSG.cpp index 16d20142b3beaef388160d7cd57cbc3bc5e3d824..e220b42c64738046ce523d1574800677cc54f382 100644 --- a/core/src/index/knowhere/knowhere/index/vector_index/nsg/NSG.cpp +++ b/core/src/index/knowhere/knowhere/index/vector_index/nsg/NSG.cpp @@ -698,13 +698,8 @@ NsgIndex::Search(const float* query, const unsigned& nq, const unsigned& dim, co int64_t* ids, SearchParams& params) { std::vector> resset(nq); - if (k >= 45) { - params.search_length = k; - } - TimeRecorder rc("NsgIndex::search", 1); - // TODO(linxj): when to use openmp - if (nq <= 4) { + if (nq == 1) { GetNeighbors(query, resset[0], nsg, ¶ms); } else { #pragma omp parallel for @@ -733,15 +728,6 @@ NsgIndex::Search(const float* query, const unsigned& nq, const unsigned& dim, co } } rc.RecordSection("merge"); - - // ProfilerStart("xx.prof"); - // std::vector resset; - // GetNeighbors(query, resset, nsg, ¶ms); - // for (int i = 0; i < k; ++i) { - // ids[i] = resset[i].id; - // dist[i] = resset[i].distance; - //} - // ProfilerStop(); } void diff --git a/core/src/index/unittest/test_nsg/test_nsg.cpp b/core/src/index/unittest/test_nsg/test_nsg.cpp index 76db0cd8c21143f73c0bceb4089d9cf0ef8f1842..074e3f2736a4f32e2979a3989f1d9620598f8057 100644 --- a/core/src/index/unittest/test_nsg/test_nsg.cpp +++ b/core/src/index/unittest/test_nsg/test_nsg.cpp @@ -233,7 +233,7 @@ TEST_F(NSGInterfaceTest, comparetest) { // } // } // } -// printf("R@1 = %.4f\n", n_1 / float(nq)); +// printf("R@1 = %.4f\n", n_1 / float(nq));; // printf("R@10 = %.4f\n", n_10 / float(nq)); // printf("R@100 = %.4f\n", n_100 / float(nq)); //} diff --git a/core/src/wrapper/ConfAdapter.cpp b/core/src/wrapper/ConfAdapter.cpp index db06504def4e2bfaee595c326c85014921d26bee..115568ba91fc83ce3bef20940a3b232e4519beae 100644 --- a/core/src/wrapper/ConfAdapter.cpp +++ b/core/src/wrapper/ConfAdapter.cpp @@ -225,7 +225,9 @@ NSGConfAdapter::CheckTrain(milvus::json& oricfg) { // auto tune params oricfg[knowhere::IndexParams::nlist] = MatchNlist(oricfg[knowhere::meta::ROWS].get(), 8192, 8192); - oricfg[knowhere::IndexParams::nprobe] = int(oricfg[knowhere::IndexParams::nlist].get() * 0.01); + + int64_t nprobe = int(oricfg[knowhere::IndexParams::nlist].get() * 0.1); + oricfg[knowhere::IndexParams::nprobe] = nprobe < 1 ? 1 : nprobe; return true; }