mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 20:09:57 +08:00
be409b29c8
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
37 lines
846 B
Go
37 lines
846 B
Go
package reader
|
|
|
|
/*
|
|
|
|
#cgo CFLAGS: -I../core/output/include
|
|
|
|
#cgo LDFLAGS: -L../core/output/lib -lmilvus_segcore -Wl,-rpath=../core/output/lib
|
|
|
|
#include "collection_c.h"
|
|
#include "segment_c.h"
|
|
|
|
*/
|
|
import "C"
|
|
import (
|
|
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
|
|
)
|
|
|
|
type IndexConfig struct{}
|
|
|
|
func (s *Segment) buildIndex(collection *Collection) commonpb.Status {
|
|
/*
|
|
int
|
|
BuildIndex(CCollection c_collection, CSegmentBase c_segment);
|
|
*/
|
|
var status = C.BuildIndex(collection.collectionPtr, s.segmentPtr)
|
|
if status != 0 {
|
|
return commonpb.Status{ErrorCode: commonpb.ErrorCode_BUILD_INDEX_ERROR}
|
|
}
|
|
return commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS}
|
|
}
|
|
|
|
func (s *Segment) dropIndex(fieldName string) commonpb.Status {
|
|
// WARN: Not support yet
|
|
|
|
return commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS}
|
|
}
|