Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
aa0b416e
milvus
项目概览
BaiXuePrincess
/
milvus
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
4
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
aa0b416e
编写于
3月 11, 2020
作者:
J
JinHai-CN
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update code
Signed-off-by:
N
JinHai-CN
<
hai.jin@zilliz.com
>
上级
a5cb8f99
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
9 addition
and
13 deletion
+9
-13
sdk/examples/simple/src/ClientTest.cpp
sdk/examples/simple/src/ClientTest.cpp
+9
-13
未找到文件。
sdk/examples/simple/src/ClientTest.cpp
浏览文件 @
aa0b416e
...
...
@@ -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
=
5
0
;
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
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录