mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-28 22:45:26 +08:00
Update code
Signed-off-by: JinHai-CN <hai.jin@zilliz.com>
This commit is contained in:
parent
a5cb8f994d
commit
aa0b416ef5
@ -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<int64_t> 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<int64_t> 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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user