base

package
v2.3.1-heliumos Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MilvusClient

type MilvusClient struct {
	// contains filtered or unexported fields
}

func NewDefaultMilvusClient

func NewDefaultMilvusClient(ctx context.Context, addr string) (*MilvusClient, error)

!!!Deprecated in future, use `NewMilvusClient` first.

func NewDefaultMilvusClientWithAuth

func NewDefaultMilvusClientWithAuth(ctx context.Context, addr, username, password string) (*MilvusClient, error)

func NewDefaultMilvusClientWithTLSAuth

func NewDefaultMilvusClientWithTLSAuth(ctx context.Context, addr, username, password string) (*MilvusClient, error)

func NewDefaultMilvusClientWithURI

func NewDefaultMilvusClientWithURI(ctx context.Context, uri, username, password string) (*MilvusClient, error)

func NewMilvusClient

func NewMilvusClient(ctx context.Context, cfg client.Config) (*MilvusClient, error)

func (*MilvusClient) AlterAlias

func (mc *MilvusClient) AlterAlias(ctx context.Context, collName string, alias string) error

AlterAlias Alter Alias

func (*MilvusClient) BulkInsert

func (mc *MilvusClient) BulkInsert(ctx context.Context, collName string, partitionName string, files []string, opts ...client.BulkInsertOption) (int64, error)

BulkInsert Bulk Insert import data files(json, numpy, etc.) on MinIO/S3 storage, read and parse them into sealed segments

func (*MilvusClient) Close

func (mc *MilvusClient) Close() error

func (*MilvusClient) Compact

func (mc *MilvusClient) Compact(ctx context.Context, collName string, toleranceDuration time.Duration) (int64, error)

Compact Manual Compaction

func (*MilvusClient) CreateAlias

func (mc *MilvusClient) CreateAlias(ctx context.Context, collName string, alias string) error

CreateAlias Create Alias

func (*MilvusClient) CreateCollection

func (mc *MilvusClient) CreateCollection(ctx context.Context, collSchema *entity.Schema, shardsNum int32, opts ...client.CreateCollectionOption) error

CreateCollection Create Collection

func (*MilvusClient) CreateCollectionByRow

func (mc *MilvusClient) CreateCollectionByRow(ctx context.Context, row entity.Row, shardNum int32) error

CreateCollectionByRow Create Collection By Row

func (*MilvusClient) CreateCredential

func (mc *MilvusClient) CreateCredential(ctx context.Context, username string, password string) error

CreateCredential Create Credential

func (*MilvusClient) CreateDatabase

func (mc *MilvusClient) CreateDatabase(ctx context.Context, dbName string) error

CreateDatabase create database with the given name.

func (*MilvusClient) CreateIndex

func (mc *MilvusClient) CreateIndex(ctx context.Context, collName string, fieldName string, idx entity.Index, async bool, opts ...client.IndexOption) error

CreateIndex Create Index

func (*MilvusClient) CreatePartition

func (mc *MilvusClient) CreatePartition(ctx context.Context, collName string, partitionName string) error

CreatePartition Create Partition

func (*MilvusClient) CreateResourceGroup

func (mc *MilvusClient) CreateResourceGroup(ctx context.Context, rgName string) error

CreateResourceGroup

func (*MilvusClient) Delete

func (mc *MilvusClient) Delete(ctx context.Context, collName string, partitionName string, expr string) error

Delete deletes entries match expression

func (*MilvusClient) DeleteByPks

func (mc *MilvusClient) DeleteByPks(ctx context.Context, collName string, partitionName string, ids entity.Column) error

DeleteByPks deletes entries related to provided primary keys

func (*MilvusClient) DeleteCredential

func (mc *MilvusClient) DeleteCredential(ctx context.Context, username string) error

DeleteCredential delete credential

func (*MilvusClient) DescribeCollection

func (mc *MilvusClient) DescribeCollection(ctx context.Context, collName string) (*entity.Collection, error)

DescribeCollection Describe collection

func (*MilvusClient) DescribeIndex

func (mc *MilvusClient) DescribeIndex(ctx context.Context, collectionName string, fieldName string, opts ...client.IndexOption) ([]entity.Index, error)

DescribeIndex Describe Index

func (*MilvusClient) DescribeResourceGroup

func (mc *MilvusClient) DescribeResourceGroup(ctx context.Context, rgName string) (*entity.ResourceGroup, error)

DescribeResourceGroup describe resource group

func (*MilvusClient) DropAlias

func (mc *MilvusClient) DropAlias(ctx context.Context, alias string) error

DropAlias drop alias

func (*MilvusClient) DropCollection

func (mc *MilvusClient) DropCollection(ctx context.Context, collName string) error

DropCollection Drop Collection

func (*MilvusClient) DropDatabase

func (mc *MilvusClient) DropDatabase(ctx context.Context, dbName string) error

DropDatabase drop database with the given db name.

func (*MilvusClient) DropIndex

func (mc *MilvusClient) DropIndex(ctx context.Context, collName string, fieldName string, opts ...client.IndexOption) error

DropIndex Drop Index

func (*MilvusClient) DropPartition

func (mc *MilvusClient) DropPartition(ctx context.Context, collName string, partitionName string) error

DropPartition Drop Partition

func (*MilvusClient) DropResourceGroup

func (mc *MilvusClient) DropResourceGroup(ctx context.Context, rgName string) error

DropResourceGroup drop resource group

func (*MilvusClient) Flush

func (mc *MilvusClient) Flush(ctx context.Context, collName string, async bool) error

Flush flush collection

func (*MilvusClient) Get

func (mc *MilvusClient) Get(ctx context.Context, collName string, ids entity.Column, opts ...client.GetOption,
) (client.ResultSet, error)

Get query from collection

func (*MilvusClient) GetBulkInsertState

func (mc *MilvusClient) GetBulkInsertState(ctx context.Context, taskID int64) (*entity.BulkInsertTaskState, error)

GetBulkInsertState checks import task state

func (*MilvusClient) GetCollectionStatistics

func (mc *MilvusClient) GetCollectionStatistics(ctx context.Context, collName string) (map[string]string, error)

GetCollectionStatistics Get Collection Statistics

func (*MilvusClient) GetCompactionState

func (mc *MilvusClient) GetCompactionState(ctx context.Context, id int64) (entity.CompactionState, error)

GetCompactionState Get Compaction State

func (*MilvusClient) GetCompactionStateWithPlans

func (mc *MilvusClient) GetCompactionStateWithPlans(ctx context.Context, id int64) (entity.CompactionState, []entity.CompactionPlan, error)

GetCompactionStateWithPlans Get Compaction State With Plans

func (*MilvusClient) GetIndexState

func (mc *MilvusClient) GetIndexState(ctx context.Context, collName string, fieldName string, opts ...client.IndexOption) (entity.IndexState, error)

GetIndexState Get IndexState, index naming is not supported yet

func (*MilvusClient) GetLoadState

func (mc *MilvusClient) GetLoadState(ctx context.Context, collName string, partitionNames []string) (entity.LoadState, error)

GetLoadState

func (*MilvusClient) GetLoadingProgress

func (mc *MilvusClient) GetLoadingProgress(ctx context.Context, collName string, partitionNames []string) (int64, error)

GetLoadingProgress

func (*MilvusClient) GetPersistentSegmentInfo

func (mc *MilvusClient) GetPersistentSegmentInfo(ctx context.Context, collName string) ([]*entity.Segment, error)

GetPersistentSegmentInfo Get Persistent Segment Info

func (*MilvusClient) GetReplicas

func (mc *MilvusClient) GetReplicas(ctx context.Context, collName string) ([]*entity.ReplicaGroup, error)

GetReplicas Get Replicas

func (*MilvusClient) HasCollection

func (mc *MilvusClient) HasCollection(ctx context.Context, collName string) (bool, error)

HasCollection Has Collection

func (*MilvusClient) HasPartition

func (mc *MilvusClient) HasPartition(ctx context.Context, collName string, partitionName string) (bool, error)

HasPartition Has Partition

func (*MilvusClient) Insert

func (mc *MilvusClient) Insert(ctx context.Context, collName string, partitionName string, columns ...entity.Column) (entity.Column, error)

Insert insert data

func (*MilvusClient) InsertRows

func (mc *MilvusClient) InsertRows(ctx context.Context, collName string, partitionName string, rows []interface{}) (entity.Column, error)

InsertRows InsertByRows insert by rows

func (*MilvusClient) ListBulkInsertTasks

func (mc *MilvusClient) ListBulkInsertTasks(ctx context.Context, collName string, limit int64) ([]*entity.BulkInsertTaskState, error)

ListBulkInsertTasks List Bulk Insert Tasks

func (*MilvusClient) ListCollections

func (mc *MilvusClient) ListCollections(ctx context.Context) ([]*entity.Collection, error)

ListCollections list collections

func (*MilvusClient) ListCredUsers

func (mc *MilvusClient) ListCredUsers(ctx context.Context) ([]string, error)

ListCredUsers list all usernames

func (*MilvusClient) ListDatabases

func (mc *MilvusClient) ListDatabases(ctx context.Context) ([]entity.Database, error)

ListDatabases list all database in milvus cluster.

func (*MilvusClient) ListResourceGroups

func (mc *MilvusClient) ListResourceGroups(ctx context.Context) ([]string, error)

ListResourceGroups List Resource Groups

func (*MilvusClient) LoadCollection

func (mc *MilvusClient) LoadCollection(ctx context.Context, collName string, async bool, opts ...client.LoadCollectionOption) error

LoadCollection Load Collection

func (*MilvusClient) LoadPartitions

func (mc *MilvusClient) LoadPartitions(ctx context.Context, collName string, partitionNames []string, async bool) error

LoadPartitions Load Partitions into memory

func (*MilvusClient) NewCollection

func (mc *MilvusClient) NewCollection(ctx context.Context, collName string, dim int64, opts ...client.CreateCollectionOption) error

NewCollection highlevel new Collection

func (*MilvusClient) Query

func (mc *MilvusClient) Query(ctx context.Context, collName string, partitions []string, expr string, outputFields []string, opts ...client.SearchQueryOptionFunc,
) (client.ResultSet, error)

Query query from collection

func (*MilvusClient) QueryByPks

func (mc *MilvusClient) QueryByPks(ctx context.Context, collName string, partitions []string, ids entity.Column,
	outputFields []string, opts ...client.SearchQueryOptionFunc) (client.ResultSet, error)

QueryByPks query from collection

func (*MilvusClient) ReleaseCollection

func (mc *MilvusClient) ReleaseCollection(ctx context.Context, collName string) error

ReleaseCollection Release Collection

func (*MilvusClient) ReleasePartitions

func (mc *MilvusClient) ReleasePartitions(ctx context.Context, collName string, partitionNames []string) error

ReleasePartitions release partitions

func (*MilvusClient) Search

func (mc *MilvusClient) Search(ctx context.Context, collName string, partitions []string, expr string,
	outputFields []string, vectors []entity.Vector, vectorField string, metricType entity.MetricType, topK int, sp entity.SearchParam, opts ...client.SearchQueryOptionFunc,
) ([]client.SearchResult, error)

Search search from collection

func (*MilvusClient) ShowPartitions

func (mc *MilvusClient) ShowPartitions(ctx context.Context, collName string) ([]*entity.Partition, error)

ShowPartitions Show Partitions

func (*MilvusClient) TransferNode

func (mc *MilvusClient) TransferNode(ctx context.Context, sourceRg, targetRg string, nodesNum int32) error

TransferNode transfer node

func (*MilvusClient) TransferReplica

func (mc *MilvusClient) TransferReplica(ctx context.Context, sourceRg, targetRg string, collectionName string, replicaNum int64) error

TransferReplica transfer replica

func (*MilvusClient) UpdateCredential

func (mc *MilvusClient) UpdateCredential(ctx context.Context, username string, oldPassword string, newPassword string) error

UpdateCredential Update Credential

func (*MilvusClient) UsingDatabase

func (mc *MilvusClient) UsingDatabase(ctx context.Context, dbName string) error

UsingDatabase for database operation after this function call. All request in any goroutine will be applied to new database on the same client. e.g. 1. goroutine A access DB1. 2. goroutine B call UsingDatabase(ctx, "DB2"). 3. goroutine A access DB2 after 2.

func (*MilvusClient) WaitForCompactionCompleted

func (mc *MilvusClient) WaitForCompactionCompleted(ctx context.Context, compactionID int64) error

*** self-hosted

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL