mirror of https://github.com/milvus-io/milvus.git
parent
99d0a69e6a
commit
38806b2c9d
|
@ -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
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#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);
|
||||
|
|
Loading…
Reference in New Issue