mirror of https://github.com/milvus-io/milvus.git
parent
99d0a69e6a
commit
38806b2c9d
|
@ -22,7 +22,7 @@ DeleteCollection(CCollection collection) {
|
||||||
delete col;
|
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;
|
auto c = (milvus::dog_segment::Collection*)c_collection;
|
||||||
std::string s(index_string);
|
std::string s(index_string);
|
||||||
c->CreateIndex(s);
|
c->CreateIndex(s);
|
||||||
|
|
|
@ -10,7 +10,7 @@ NewCollection(const char* collection_name, const char* schema_conf);
|
||||||
void
|
void
|
||||||
DeleteCollection(CCollection collection);
|
DeleteCollection(CCollection collection);
|
||||||
|
|
||||||
void UpdateIndexs(CCollection c_collection, const char *index_string);
|
void UpdateIndexes(CCollection c_collection, const char *index_string);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#include "SegmentBase.h"
|
#include "SegmentBase.h"
|
||||||
|
#include "Collection.h"
|
||||||
#include "segment_c.h"
|
#include "segment_c.h"
|
||||||
#include "Partition.h"
|
#include "Partition.h"
|
||||||
#include <knowhere/index/vector_index/VecIndex.h>
|
#include <knowhere/index/vector_index/VecIndex.h>
|
||||||
|
@ -162,9 +163,10 @@ Close(CSegmentBase c_segment) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
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 segment = (milvus::dog_segment::SegmentBase*)c_segment;
|
||||||
auto status = segment->BuildIndex(nullptr);
|
auto status = segment->BuildIndex(collection->get_index());
|
||||||
return status.code();
|
return status.code();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ int
|
||||||
Close(CSegmentBase c_segment);
|
Close(CSegmentBase c_segment);
|
||||||
|
|
||||||
int
|
int
|
||||||
BuildIndex(CSegmentBase c_segment);
|
BuildIndex(CCollection c_collection, CSegmentBase c_segment);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
IsOpened(CSegmentBase c_segment);
|
IsOpened(CSegmentBase c_segment);
|
||||||
|
|
Loading…
Reference in New Issue