diff --git a/sdk/examples/simple/src/ClientTest.cpp b/sdk/examples/simple/src/ClientTest.cpp index 06161166aa7279dcbdbe536e93c49b13d7e36c65..fb2e2b138d9f0a41cfd4e9f0f446be2bc1f6807e 100644 --- a/sdk/examples/simple/src/ClientTest.cpp +++ b/sdk/examples/simple/src/ClientTest.cpp @@ -31,7 +31,7 @@ constexpr int64_t NQ = 5; constexpr int64_t TOP_K = 10; constexpr int64_t NPROBE = 32; constexpr int64_t SEARCH_TARGET = 5000; // change this value, result is different -constexpr int64_t ADD_ENTITY_LOOP = 50; +constexpr int64_t ADD_ENTITY_LOOP = 5; constexpr milvus::IndexType INDEX_TYPE = milvus::IndexType::IVFSQ8; constexpr int32_t NLIST = 16384; @@ -245,19 +245,15 @@ ClientTest::Test() { Flush(collection_name); ShowCollectionInfo(collection_name); -// GetEntityById(collection_name, search_id_array_[0]); -// SearchEntities(collection_name, TOP_K, NPROBE); -// -// CreateIndex(collection_name, INDEX_TYPE, NLIST); -// ShowCollectionInfo(collection_name); -// -// PreloadCollection(collection_name); + GetEntityById(collection_name, search_id_array_[0]); + SearchEntities(collection_name, TOP_K, NPROBE); - constexpr long vector_size = 2000000; - std::vector delete_ids(vector_size); // = {search_id_array_[0], search_id_array_[1]}; - for(long i= 0; i < vector_size; ++ i) { - delete_ids[i] = i; - } + CreateIndex(collection_name, INDEX_TYPE, NLIST); + ShowCollectionInfo(collection_name); + + PreloadCollection(collection_name); + + std::vector delete_ids = {search_id_array_[0], search_id_array_[1]}; DeleteByIds(collection_name, delete_ids); SearchEntities(collection_name, TOP_K, NPROBE); // this line get two search error since we delete two entities