Documentation ¶
Index ¶
- Constants
- func ConstructIndexParam(dim int, indexType string, metricType string) []*commonpb.KeyValuePair
- func ConstructSchema(collection string, dim int, autoID bool, fields ...*schemapb.FieldSchema) *schemapb.CollectionSchema
- func ConstructSchemaOfVecDataType(collection string, dim int, autoID bool, dataType schemapb.DataType) *schemapb.CollectionSchema
- func ConstructSearchRequest(dbName, collectionName string, expr string, vecField string, ...) *milvuspb.SearchRequest
- func ConstructSearchRequestWithConsistencyLevel(dbName, collectionName string, expr string, vecField string, ...) *milvuspb.SearchRequest
- func DefaultParams() map[string]string
- func GenerateBoolArray(numRows int) ([]bool, int)
- func GenerateHashKeys(numRows int) []uint32
- func GenerateInt64Array(numRows int, start int64) []int64
- func GenerateSameInt64Array(numRows int, value int64) []int64
- func GenerateSameStringArray(numRows int, value string) []string
- func GenerateSparseFloatArray(numRows int) *schemapb.SparseFloatArray
- func GetSearchParams(indexType string, metricType string) map[string]any
- func NewBFloat16VectorFieldData(fieldName string, numRows, dim int) *schemapb.FieldData
- func NewBinaryVectorFieldData(fieldName string, numRows, dim int) *schemapb.FieldData
- func NewFloat16VectorFieldData(fieldName string, numRows, dim int) *schemapb.FieldData
- func NewFloatVectorFieldData(fieldName string, numRows, dim int) *schemapb.FieldData
- func NewInt64FieldData(fieldName string, numRows int) *schemapb.FieldData
- func NewInt64FieldDataNullableWithStart(fieldName string, numRows, start int) *schemapb.FieldData
- func NewInt64FieldDataWithStart(fieldName string, numRows int, start int64) *schemapb.FieldData
- func NewInt64SameFieldData(fieldName string, numRows int, value int64) *schemapb.FieldData
- func NewSparseFloatVectorFieldData(fieldName string, numRows int) *schemapb.FieldData
- func NewStringFieldData(fieldName string, numRows int) *schemapb.FieldData
- func NewVarCharSameFieldData(fieldName string, numRows int, value string) *schemapb.FieldData
- func PrettyReplica(replica *querypb.Replica) string
- type CreateCollectionConfig
- type EmbedEtcdSuite
- type EtcdMetaWatcher
- type MetaWatcher
- type MiniClusterSuite
- func (s *MiniClusterSuite) CheckCollectionCacheReleased(collectionID int64)
- func (s *MiniClusterSuite) CreateCollectionWithConfiguration(ctx context.Context, cfg *CreateCollectionConfig)
- func (s *MiniClusterSuite) SetupSuite()
- func (s *MiniClusterSuite) SetupTest()
- func (s *MiniClusterSuite) TearDownSuite()
- func (s *MiniClusterSuite) TearDownTest()
- func (s *MiniClusterSuite) WaitForFlush(ctx context.Context, segIDs []int64, flushTs uint64, ...)
- func (s *MiniClusterSuite) WaitForIndexBuilt(ctx context.Context, collection, field string)
- func (s *MiniClusterSuite) WaitForIndexBuiltWithDB(ctx context.Context, dbName, collection, field string)
- func (s *MiniClusterSuite) WaitForIndexBuiltWithIndexName(ctx context.Context, collection, field, indexName string)
- func (s *MiniClusterSuite) WaitForLoad(ctx context.Context, collection string)
- func (s *MiniClusterSuite) WaitForLoadRefresh(ctx context.Context, dbName, collection string)
- func (s *MiniClusterSuite) WaitForLoadWithDB(ctx context.Context, dbName, collection string)
- func (s *MiniClusterSuite) WaitForSortedSegmentLoaded(ctx context.Context, dbName, collection string)
- type MiniClusterV2
- func (cluster *MiniClusterV2) AddDataNode() *grpcdatanode.Server
- func (cluster *MiniClusterV2) AddQueryNode() *grpcquerynode.Server
- func (cluster *MiniClusterV2) AddQueryNodes(k int) []*grpcquerynode.Server
- func (cluster *MiniClusterV2) AddStreamingNode()
- func (cluster *MiniClusterV2) GetAllQueryNodes() []*grpcquerynode.Server
- func (cluster *MiniClusterV2) GetAvailablePort() (int, error)
- func (cluster *MiniClusterV2) GetAvailablePorts(n int) ([]int, error)
- func (cluster *MiniClusterV2) GetContext() context.Context
- func (cluster *MiniClusterV2) GetFactory() dependency.Factory
- func (cluster *MiniClusterV2) Start() error
- func (cluster *MiniClusterV2) StartDataCoord()
- func (cluster *MiniClusterV2) StartQueryCoord()
- func (cluster *MiniClusterV2) StartRootCoord()
- func (cluster *MiniClusterV2) Stop() error
- func (cluster *MiniClusterV2) StopAllDataNodes()
- func (cluster *MiniClusterV2) StopAllQueryNodes()
- func (cluster *MiniClusterV2) StopAllStreamingNodes()
- func (cluster *MiniClusterV2) StopDataCoord()
- func (cluster *MiniClusterV2) StopQueryCoord()
- func (cluster *MiniClusterV2) StopRootCoord()
- type OptionV2
- type ReportChanExtension
Constants ¶
View Source
const ( IndexRaftIvfFlat = "GPU_IVF_FLAT" IndexRaftIvfPQ = "GPU_IVF_PQ" IndexFaissIDMap = "FLAT" IndexFaissIvfFlat = "IVF_FLAT" IndexFaissIvfPQ = "IVF_PQ" IndexScaNN = "SCANN" IndexFaissIvfSQ8 = "IVF_SQ8" IndexFaissBinIDMap = "BIN_FLAT" IndexFaissBinIvfFlat = "BIN_IVF_FLAT" IndexHNSW = "HNSW" IndexDISKANN = "DISKANN" IndexSparseInvertedIndex = "SPARSE_INVERTED_INDEX" IndexSparseWand = "SPARSE_WAND" )
View Source
const ( AnnsFieldKey = "anns_field" TopKKey = "topk" NQKey = "nq" MetricTypeKey = common.MetricTypeKey SearchParamsKey = common.IndexParamsKey RoundDecimalKey = "round_decimal" OffsetKey = "offset" LimitKey = "limit" )
View Source
const ( BoolField = "boolField" Int8Field = "int8Field" Int16Field = "int16Field" Int32Field = "int32Field" Int64Field = "int64Field" FloatField = "floatField" DoubleField = "doubleField" VarCharField = "varCharField" JSONField = "jsonField" FloatVecField = "floatVecField" BinVecField = "binVecField" Float16VecField = "float16VecField" BFloat16VecField = "bfloat16VecField" SparseFloatVecField = "sparseFloatVecField" )
Variables ¶
This section is empty.
Functions ¶
func ConstructIndexParam ¶
func ConstructIndexParam(dim int, indexType string, metricType string) []*commonpb.KeyValuePair
func ConstructSchema ¶
func ConstructSchema(collection string, dim int, autoID bool, fields ...*schemapb.FieldSchema) *schemapb.CollectionSchema
func ConstructSearchRequest ¶
func ConstructSearchRequestWithConsistencyLevel ¶
func ConstructSearchRequestWithConsistencyLevel( dbName, collectionName string, expr string, vecField string, vectorType schemapb.DataType, outputFields []string, metricType string, params map[string]any, nq, dim int, topk, roundDecimal int, useDefaultConsistency bool, consistencyLevel commonpb.ConsistencyLevel, ) *milvuspb.SearchRequest
func DefaultParams ¶
func GenerateBoolArray ¶
func GenerateHashKeys ¶
func GenerateInt64Array ¶
func GenerateSameInt64Array ¶
func GenerateSameStringArray ¶
func GenerateSparseFloatArray ¶
func GenerateSparseFloatArray(numRows int) *schemapb.SparseFloatArray
func NewFloatVectorFieldData ¶
func NewInt64SameFieldData ¶
func NewStringFieldData ¶
func NewVarCharSameFieldData ¶
func PrettyReplica ¶
Types ¶
type CreateCollectionConfig ¶
type EmbedEtcdSuite ¶
EmbedEtcdSuite contains embed setup & teardown related logic
func (*EmbedEtcdSuite) SetupEmbedEtcd ¶
func (s *EmbedEtcdSuite) SetupEmbedEtcd() error
func (*EmbedEtcdSuite) TearDownEmbedEtcd ¶
func (s *EmbedEtcdSuite) TearDownEmbedEtcd()
type EtcdMetaWatcher ¶
type EtcdMetaWatcher struct { MetaWatcher // contains filtered or unexported fields }
func (*EtcdMetaWatcher) ShowReplicas ¶
func (watcher *EtcdMetaWatcher) ShowReplicas() ([]*querypb.Replica, error)
func (*EtcdMetaWatcher) ShowSegments ¶
func (watcher *EtcdMetaWatcher) ShowSegments() ([]*datapb.SegmentInfo, error)
func (*EtcdMetaWatcher) ShowSessions ¶
func (watcher *EtcdMetaWatcher) ShowSessions() ([]*sessionutil.SessionRaw, error)
type MetaWatcher ¶
type MetaWatcher interface { ShowSessions() ([]*sessionutil.SessionRaw, error) ShowSegments() ([]*datapb.SegmentInfo, error) ShowReplicas() ([]*querypb.Replica, error) }
MetaWatcher to observe meta data of milvus cluster
type MiniClusterSuite ¶
type MiniClusterSuite struct { suite.Suite EmbedEtcdSuite Cluster *MiniClusterV2 // contains filtered or unexported fields }
func (*MiniClusterSuite) CheckCollectionCacheReleased ¶
func (s *MiniClusterSuite) CheckCollectionCacheReleased(collectionID int64)
CheckCollectionCacheReleased checks if the collection cache was released from querynodes.
func (*MiniClusterSuite) CreateCollectionWithConfiguration ¶
func (s *MiniClusterSuite) CreateCollectionWithConfiguration(ctx context.Context, cfg *CreateCollectionConfig)
func (*MiniClusterSuite) SetupSuite ¶
func (s *MiniClusterSuite) SetupSuite()
func (*MiniClusterSuite) SetupTest ¶
func (s *MiniClusterSuite) SetupTest()
func (*MiniClusterSuite) TearDownSuite ¶
func (s *MiniClusterSuite) TearDownSuite()
func (*MiniClusterSuite) TearDownTest ¶
func (s *MiniClusterSuite) TearDownTest()
func (*MiniClusterSuite) WaitForFlush ¶
func (*MiniClusterSuite) WaitForIndexBuilt ¶
func (s *MiniClusterSuite) WaitForIndexBuilt(ctx context.Context, collection, field string)
func (*MiniClusterSuite) WaitForIndexBuiltWithDB ¶
func (s *MiniClusterSuite) WaitForIndexBuiltWithDB(ctx context.Context, dbName, collection, field string)
func (*MiniClusterSuite) WaitForIndexBuiltWithIndexName ¶
func (s *MiniClusterSuite) WaitForIndexBuiltWithIndexName(ctx context.Context, collection, field, indexName string)
func (*MiniClusterSuite) WaitForLoad ¶
func (s *MiniClusterSuite) WaitForLoad(ctx context.Context, collection string)
func (*MiniClusterSuite) WaitForLoadRefresh ¶
func (s *MiniClusterSuite) WaitForLoadRefresh(ctx context.Context, dbName, collection string)
func (*MiniClusterSuite) WaitForLoadWithDB ¶
func (s *MiniClusterSuite) WaitForLoadWithDB(ctx context.Context, dbName, collection string)
func (*MiniClusterSuite) WaitForSortedSegmentLoaded ¶
func (s *MiniClusterSuite) WaitForSortedSegmentLoaded(ctx context.Context, dbName, collection string)
type MiniClusterV2 ¶
type MiniClusterV2 struct { ChunkManager storage.ChunkManager EtcdCli *clientv3.Client Proxy *grpcproxy.Server DataCoord *grpcdatacoord.Server RootCoord *grpcrootcoord.Server QueryCoord *grpcquerycoord.Server DataCoordClient types.DataCoordClient RootCoordClient types.RootCoordClient QueryCoordClient types.QueryCoordClient MilvusClient milvuspb.MilvusServiceClient ProxyClient types.ProxyClient DataNodeClient types.DataNodeClient QueryNodeClient types.QueryNodeClient IndexNodeClient types.IndexNodeClient DataNode *grpcdatanode.Server StreamingNode *streamingnode.Server QueryNode *grpcquerynode.Server IndexNode *grpcindexnode.Server MetaWatcher MetaWatcher Extension *ReportChanExtension // contains filtered or unexported fields }
func StartMiniClusterV2 ¶
func StartMiniClusterV2(ctx context.Context, opts ...OptionV2) (*MiniClusterV2, error)
func (*MiniClusterV2) AddDataNode ¶
func (cluster *MiniClusterV2) AddDataNode() *grpcdatanode.Server
func (*MiniClusterV2) AddQueryNode ¶
func (cluster *MiniClusterV2) AddQueryNode() *grpcquerynode.Server
func (*MiniClusterV2) AddQueryNodes ¶
func (cluster *MiniClusterV2) AddQueryNodes(k int) []*grpcquerynode.Server
func (*MiniClusterV2) AddStreamingNode ¶
func (cluster *MiniClusterV2) AddStreamingNode()
func (*MiniClusterV2) GetAllQueryNodes ¶
func (cluster *MiniClusterV2) GetAllQueryNodes() []*grpcquerynode.Server
func (*MiniClusterV2) GetAvailablePort ¶
func (cluster *MiniClusterV2) GetAvailablePort() (int, error)
func (*MiniClusterV2) GetAvailablePorts ¶
func (cluster *MiniClusterV2) GetAvailablePorts(n int) ([]int, error)
func (*MiniClusterV2) GetContext ¶
func (cluster *MiniClusterV2) GetContext() context.Context
func (*MiniClusterV2) GetFactory ¶
func (cluster *MiniClusterV2) GetFactory() dependency.Factory
func (*MiniClusterV2) Start ¶
func (cluster *MiniClusterV2) Start() error
func (*MiniClusterV2) StartDataCoord ¶
func (cluster *MiniClusterV2) StartDataCoord()
func (*MiniClusterV2) StartQueryCoord ¶
func (cluster *MiniClusterV2) StartQueryCoord()
func (*MiniClusterV2) StartRootCoord ¶
func (cluster *MiniClusterV2) StartRootCoord()
func (*MiniClusterV2) Stop ¶
func (cluster *MiniClusterV2) Stop() error
func (*MiniClusterV2) StopAllDataNodes ¶
func (cluster *MiniClusterV2) StopAllDataNodes()
func (*MiniClusterV2) StopAllQueryNodes ¶
func (cluster *MiniClusterV2) StopAllQueryNodes()
func (*MiniClusterV2) StopAllStreamingNodes ¶
func (cluster *MiniClusterV2) StopAllStreamingNodes()
func (*MiniClusterV2) StopDataCoord ¶
func (cluster *MiniClusterV2) StopDataCoord()
func (*MiniClusterV2) StopQueryCoord ¶
func (cluster *MiniClusterV2) StopQueryCoord()
func (*MiniClusterV2) StopRootCoord ¶
func (cluster *MiniClusterV2) StopRootCoord()
type OptionV2 ¶
type OptionV2 func(cluster *MiniClusterV2)
type ReportChanExtension ¶
type ReportChanExtension struct {
// contains filtered or unexported fields
}
func InitReportExtension ¶
func InitReportExtension() *ReportChanExtension
func NewReportChanExtension ¶
func NewReportChanExtension() *ReportChanExtension
func (*ReportChanExtension) GetReportChan ¶
func (r *ReportChanExtension) GetReportChan() <-chan any
func (*ReportChanExtension) Report ¶
func (r *ReportChanExtension) Report(info any) int
Click to show internal directories.
Click to hide internal directories.