Documentation
¶
Index ¶
- Constants
- type Client
- type Collection
- type CollectionConfig
- func WithDataType(dataType DataType) CollectionConfig
- func WithDimension(dimension int) CollectionConfig
- func WithExtraParams(configs ...ExtraParamsConfig) CollectionConfig
- func WithFieldSchema(name string, fieldType FieldType) CollectionConfig
- func WithMetric(metric Metric) CollectionConfig
- func WithVectorSchema(name string, dimension int, configs ...VectorSchemaConfig) CollectionConfig
- type CollectionDescResponse
- type CollectionListResponse
- type CollectionMeta
- type CollectionStats
- type CollectionStatsResponse
- type DataType
- type Doc
- type DocOp
- type DocOpResult
- type DocumentConfig
- type DocumentsConfig
- type DocumentsGroupQueryConfig
- func GroupQueryWithCount(groupCount int) DocumentsGroupQueryConfig
- func GroupQueryWithFilter(filter string) DocumentsGroupQueryConfig
- func GroupQueryWithId(id string) DocumentsGroupQueryConfig
- func GroupQueryWithIncludeVector(includeVector bool) DocumentsGroupQueryConfig
- func GroupQueryWithOutputFields(fields ...string) DocumentsGroupQueryConfig
- func GroupQueryWithSchemaVector(vectorField string) DocumentsGroupQueryConfig
- func GroupQueryWithSparseVector(key int32, value float32) DocumentsGroupQueryConfig
- func GroupQueryWithTopk(groupTopk int) DocumentsGroupQueryConfig
- func GroupQueryWithVector(vector ...float32) DocumentsGroupQueryConfig
- type DocumentsGroupQueryResponse
- type DocumentsQueryConfig
- func QueryWithFilter(filter string) DocumentsQueryConfig
- func QueryWithId(id string) DocumentsQueryConfig
- func QueryWithIncludeVector(includeVector bool) DocumentsQueryConfig
- func QueryWithOutputFields(fields ...string) DocumentsQueryConfig
- func QueryWithRrfRanker(rankConstant int) DocumentsQueryConfig
- func QueryWithSchemaVector(name string, vector []float32, configs ...VectorQueryConfig) DocumentsQueryConfig
- func QueryWithSparseVector(key int32, value float32) DocumentsQueryConfig
- func QueryWithTopk(topk int) DocumentsQueryConfig
- func QueryWithVector(vector ...float32) DocumentsQueryConfig
- func QueryWithVectorQueryParam(configs ...VectorQueryConfig) DocumentsQueryConfig
- func QueryWithWeightedRanker(weights map[string]float32) DocumentsQueryConfig
- type DocumentsQueryResponse
- type DocumentsReadResponse
- type DocumentsWriteResponse
- type ExtraParamsConfig
- type FieldType
- type Group
- type Metric
- type Partition
- type PartitionDescResponse
- type PartitionListResponse
- type PartitionStats
- type PartitionStatsResponse
- type QuantizeType
- type Response
- type ResponseUsage
- type Status
- type VectorQueryConfig
- type VectorSchema
- type VectorSchemaConfig
Constants ¶
View Source
const QuantizeTypeInt8 = "DT_VECTOR_INT8"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
Create(ctx context.Context, collectionName string, configs ...CollectionConfig) (Response, error)
Desc(ctx context.Context, collectionName string) (CollectionDescResponse, error)
List(ctx context.Context) (CollectionListResponse, error)
Stats(ctx context.Context, collectionName string) (CollectionStatsResponse, error)
Delete(ctx context.Context, collectionName string) (Response, error)
CreateServing(ctx context.Context, collectionName string, configs ...CollectionConfig) (Response, error)
GetCollection(collectionName string) Collection
}
type Collection ¶
type Collection interface {
Create(ctx context.Context, partitionName string) (Response, error)
Desc(ctx context.Context, partitionName string) (PartitionDescResponse, error)
List(ctx context.Context) (PartitionListResponse, error)
Stats(ctx context.Context, partitionName string) (PartitionStatsResponse, error)
Delete(ctx context.Context, partitionName string) (Response, error)
CreateServing(ctx context.Context, partitionName string) (Response, error)
GetPartition(partitionName ...string) Partition
Partition
}
type CollectionConfig ¶
type CollectionConfig func(*collectionCreateRequest)
func WithDataType ¶
func WithDataType(dataType DataType) CollectionConfig
func WithDimension ¶
func WithDimension(dimension int) CollectionConfig
func WithExtraParams ¶
func WithExtraParams(configs ...ExtraParamsConfig) CollectionConfig
func WithFieldSchema ¶
func WithFieldSchema(name string, fieldType FieldType) CollectionConfig
func WithMetric ¶
func WithMetric(metric Metric) CollectionConfig
func WithVectorSchema ¶
func WithVectorSchema(name string, dimension int, configs ...VectorSchemaConfig) CollectionConfig
type CollectionDescResponse ¶
type CollectionDescResponse interface {
Response
GetOutput() CollectionMeta
}
type CollectionListResponse ¶
type CollectionMeta ¶
type CollectionStats ¶
type CollectionStats interface {
GetTotalDocCount() int64
GetIndexCompleteness() float64
GetPartitions() map[string]PartitionStats
}
type CollectionStatsResponse ¶
type CollectionStatsResponse interface {
Response
GetOutput() CollectionStats
}
type DocOpResult ¶
type DocumentConfig ¶
type DocumentConfig func(*doc)
func WithField ¶
func WithField(name string, value any) DocumentConfig
func WithId ¶
func WithId(id string) DocumentConfig
func WithSchemaVector ¶
func WithSchemaVector(name string, vector ...float32) DocumentConfig
func WithSparseVector ¶
func WithSparseVector(key int32, value float32) DocumentConfig
func WithVector ¶
func WithVector(vector ...float32) DocumentConfig
type DocumentsConfig ¶
type DocumentsConfig func(*documentsWriteRequest, func(*doc) bool)
func WithDocument ¶
func WithDocument(configs ...DocumentConfig) DocumentsConfig
type DocumentsGroupQueryConfig ¶
type DocumentsGroupQueryConfig func(*documentsGroupQueryRequest)
func GroupQueryWithCount ¶
func GroupQueryWithCount(groupCount int) DocumentsGroupQueryConfig
func GroupQueryWithFilter ¶
func GroupQueryWithFilter(filter string) DocumentsGroupQueryConfig
func GroupQueryWithId ¶
func GroupQueryWithId(id string) DocumentsGroupQueryConfig
func GroupQueryWithIncludeVector ¶
func GroupQueryWithIncludeVector(includeVector bool) DocumentsGroupQueryConfig
func GroupQueryWithOutputFields ¶
func GroupQueryWithOutputFields(fields ...string) DocumentsGroupQueryConfig
func GroupQueryWithSchemaVector ¶
func GroupQueryWithSchemaVector(vectorField string) DocumentsGroupQueryConfig
func GroupQueryWithSparseVector ¶
func GroupQueryWithSparseVector(key int32, value float32) DocumentsGroupQueryConfig
func GroupQueryWithTopk ¶
func GroupQueryWithTopk(groupTopk int) DocumentsGroupQueryConfig
func GroupQueryWithVector ¶
func GroupQueryWithVector(vector ...float32) DocumentsGroupQueryConfig
type DocumentsQueryConfig ¶
type DocumentsQueryConfig func(*documentsQueryRequest)
func QueryWithFilter ¶
func QueryWithFilter(filter string) DocumentsQueryConfig
func QueryWithId ¶
func QueryWithId(id string) DocumentsQueryConfig
func QueryWithIncludeVector ¶
func QueryWithIncludeVector(includeVector bool) DocumentsQueryConfig
func QueryWithOutputFields ¶
func QueryWithOutputFields(fields ...string) DocumentsQueryConfig
func QueryWithRrfRanker ¶
func QueryWithRrfRanker(rankConstant int) DocumentsQueryConfig
func QueryWithSchemaVector ¶
func QueryWithSchemaVector(name string, vector []float32, configs ...VectorQueryConfig) DocumentsQueryConfig
func QueryWithSparseVector ¶
func QueryWithSparseVector(key int32, value float32) DocumentsQueryConfig
func QueryWithTopk ¶
func QueryWithTopk(topk int) DocumentsQueryConfig
func QueryWithVector ¶
func QueryWithVector(vector ...float32) DocumentsQueryConfig
func QueryWithVectorQueryParam ¶
func QueryWithVectorQueryParam(configs ...VectorQueryConfig) DocumentsQueryConfig
func QueryWithWeightedRanker ¶
func QueryWithWeightedRanker(weights map[string]float32) DocumentsQueryConfig
type DocumentsQueryResponse ¶
type DocumentsQueryResponse interface {
Response
GetOutput() []Doc
GetUsage() ResponseUsage
}
type DocumentsReadResponse ¶
type DocumentsReadResponse interface {
Response
GetOutput() map[string]Doc
GetUsage() ResponseUsage
}
type DocumentsWriteResponse ¶
type DocumentsWriteResponse interface {
Response
GetOutput() []DocOpResult
GetUsage() ResponseUsage
}
type ExtraParamsConfig ¶
type ExtraParamsConfig func(*extraParams)
func WithAutoId ¶
func WithAutoId(autoId string) ExtraParamsConfig
func WithQuantizeType ¶
func WithQuantizeType(quantizeType QuantizeType) ExtraParamsConfig
type Partition ¶
type Partition interface {
Insert(ctx context.Context, configs ...DocumentsConfig) (DocumentsWriteResponse, error)
Update(ctx context.Context, configs ...DocumentsConfig) (DocumentsWriteResponse, error)
Upsert(ctx context.Context, configs ...DocumentsConfig) (DocumentsWriteResponse, error)
Get(ctx context.Context, ids ...string) (DocumentsReadResponse, error)
Drop(ctx context.Context, ids ...string) (DocumentsWriteResponse, error)
DropAll(ctx context.Context) (DocumentsWriteResponse, error)
Query(ctx context.Context, configs ...DocumentsQueryConfig) (DocumentsQueryResponse, error)
GroupQuery(ctx context.Context, field string, configs ...DocumentsGroupQueryConfig) (DocumentsGroupQueryResponse, error)
}
type PartitionDescResponse ¶
type PartitionListResponse ¶
type PartitionStats ¶
type PartitionStats interface {
GetTotalDocCount() int64
}
type PartitionStatsResponse ¶
type PartitionStatsResponse interface {
Response
GetOutput() PartitionStats
}
type QuantizeType ¶
type QuantizeType string
type ResponseUsage ¶
type VectorQueryConfig ¶
type VectorQueryConfig func(*vectorQuery)
func QueryWithEf ¶
func QueryWithEf(ef int) VectorQueryConfig
func QueryWithLinear ¶
func QueryWithLinear(isLinear bool) VectorQueryConfig
func QueryWithNumCandidates ¶
func QueryWithNumCandidates(numCandidates int) VectorQueryConfig
func QueryWithRadius ¶
func QueryWithRadius(radius float32) VectorQueryConfig
type VectorSchema ¶
type VectorSchema interface {
GetDimension() int
GetDataType() DataType
GetMetric() Metric
GetQuantizeType() QuantizeType
}
type VectorSchemaConfig ¶
type VectorSchemaConfig func(*vectorSchemaParam)
func WithVectorDataType ¶
func WithVectorDataType(dataType DataType) VectorSchemaConfig
func WithVectorMetric ¶
func WithVectorMetric(metric Metric) VectorSchemaConfig
func WithVectorQuantizeType ¶
func WithVectorQuantizeType(quantizeType QuantizeType) VectorSchemaConfig
Click to show internal directories.
Click to hide internal directories.