提交 38806b2c 编写于 作者: B bigsheeper 提交者: yefu.chen

Update index api

Signed-off-by: Nbigsheeper <yihao.dai@zilliz.com>
上级 99d0a69e
......@@ -22,7 +22,7 @@ DeleteCollection(CCollection collection) {
delete col;
}
void UpdateIndexs(CCollection c_collection, const char *index_string) {
void UpdateIndexes(CCollection c_collection, const char *index_string) {
auto c = (milvus::dog_segment::Collection*)c_collection;
std::string s(index_string);
c->CreateIndex(s);
......
......@@ -10,7 +10,7 @@ NewCollection(const char* collection_name, const char* schema_conf);
void
DeleteCollection(CCollection collection);
void UpdateIndexs(CCollection c_collection, const char *index_string);
void UpdateIndexes(CCollection c_collection, const char *index_string);
#ifdef __cplusplus
}
......
#include <cstring>
#include "SegmentBase.h"
#include "Collection.h"
#include "segment_c.h"
#include "Partition.h"
#include <knowhere/index/vector_index/VecIndex.h>
......@@ -162,9 +163,10 @@ Close(CSegmentBase c_segment) {
}
int
BuildIndex(CSegmentBase c_segment) {
BuildIndex(CCollection c_collection, CSegmentBase c_segment) {
auto collection = (milvus::dog_segment::Collection*)c_collection;
auto segment = (milvus::dog_segment::SegmentBase*)c_segment;
auto status = segment->BuildIndex(nullptr);
auto status = segment->BuildIndex(collection->get_index());
return status.code();
}
......
......@@ -68,7 +68,7 @@ int
Close(CSegmentBase c_segment);
int
BuildIndex(CSegmentBase c_segment);
BuildIndex(CCollection c_collection, CSegmentBase c_segment);
bool
IsOpened(CSegmentBase c_segment);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册