Documentation
¶
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) Count(ctx context.Context, collectionName string, opts ...CountPointsOption) (uint64, error)
- func (c *Client) CreateCollection(ctx context.Context, name string, opts ...CreateCollectionOption) error
- func (c *Client) DeleteCollection(ctx context.Context, name string, opts ...DeleteCollectionOption) error
- func (c *Client) Grpc() *GrpcClient
- func (c *Client) ListCollections(ctx context.Context) ([]string, error)
- func (c *Client) Upsert(ctx context.Context, collectionName string, opts ...UpsertPointsOption) (*grpc.UpdateResult, error)
- func (c *Client) UpsertPoints(ctx context.Context, collectionName string, points ...*grpc.PointStruct) (*grpc.UpdateResult, error)
- type Config
- type CountPointsOption
- type CreateCollectionOption
- func WithBinaryQuantization(config *qdrant.BinaryQuantization) CreateCollectionOption
- func WithCreateTimeout(timeout uint64) CreateCollectionOption
- func WithHnswConfig(config *qdrant.HnswConfigDiff) CreateCollectionOption
- func WithInitFromCollection(collection string) CreateCollectionOption
- func WithOnDiskPayload(value bool) CreateCollectionOption
- func WithOptimizersConfig(config *qdrant.OptimizersConfigDiff) CreateCollectionOption
- func WithProductQuantization(config *qdrant.ProductQuantization) CreateCollectionOption
- func WithReplicationFactor(factor uint32) CreateCollectionOption
- func WithScalarQuantization(config *qdrant.ScalarQuantization) CreateCollectionOption
- func WithShardNumber(number uint32) CreateCollectionOption
- func WithShardingMethod(method qdrant.ShardingMethod) CreateCollectionOption
- func WithSparseVectorsConfig(params map[string]*qdrant.SparseVectorParams) CreateCollectionOption
- func WithVectorConfig(params *qdrant.VectorParams) CreateCollectionOption
- func WithVectorConfigMap(params map[string]*qdrant.VectorParams) CreateCollectionOption
- func WithWalConfig(config *qdrant.WalConfigDiff) CreateCollectionOption
- func WithWriteConsistencyFactor(factor uint32) CreateCollectionOption
- type DeleteCollectionOption
- type GrpcClient
- type UpsertPointsOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientFromGrpc ¶
func NewClientFromGrpc(grpcClient *GrpcClient) *Client
func (*Client) Count ¶
func (c *Client) Count(ctx context.Context, collectionName string, opts ...CountPointsOption) (uint64, error)
Returns the number of points in the given collection. Optionally, a filter can be applied.
func (*Client) CreateCollection ¶
func (c *Client) CreateCollection(ctx context.Context, name string, opts ...CreateCollectionOption) error
Creates a new Qdrant collection with the given name and options
func (*Client) DeleteCollection ¶
func (*Client) Grpc ¶
func (c *Client) Grpc() *GrpcClient
func (*Client) ListCollections ¶
Lists all the collections in the Qdrant instance
func (*Client) Upsert ¶
func (c *Client) Upsert(ctx context.Context, collectionName string, opts ...UpsertPointsOption) (*grpc.UpdateResult, error)
Performs an upsert operation on the given collection
func (*Client) UpsertPoints ¶
func (c *Client) UpsertPoints(ctx context.Context, collectionName string, points ...*grpc.PointStruct) (*grpc.UpdateResult, error)
type Config ¶
type Config struct { Host string Port int ApiToken string UseTls bool GrpcOptions []grpc.DialOption // contains filtered or unexported fields }
func (*Config) GetTransportCreds ¶
func (c *Config) GetTransportCreds() grpc.DialOption
type CountPointsOption ¶
type CountPointsOption func(c *grpc.CountPoints)
func WithCountConsistency ¶
func WithCountConsistency(consistency grpc.ReadConsistencyType) CountPointsOption
func WithCountExact ¶
func WithCountExact(exact bool) CountPointsOption
func WithCountFilter ¶
func WithCountFilter(filter *grpc.Filter) CountPointsOption
func WithCountShardKeySelector ¶
func WithCountShardKeySelector(selector *grpc.ShardKeySelector) CountPointsOption
type CreateCollectionOption ¶
type CreateCollectionOption func(c *qdrant.CreateCollection)
============ BEGIN CREATE COLLECTION OPTIONS ==============
func WithBinaryQuantization ¶
func WithBinaryQuantization(config *qdrant.BinaryQuantization) CreateCollectionOption
func WithCreateTimeout ¶
func WithCreateTimeout(timeout uint64) CreateCollectionOption
func WithHnswConfig ¶
func WithHnswConfig(config *qdrant.HnswConfigDiff) CreateCollectionOption
func WithInitFromCollection ¶
func WithInitFromCollection(collection string) CreateCollectionOption
func WithOnDiskPayload ¶
func WithOnDiskPayload(value bool) CreateCollectionOption
func WithOptimizersConfig ¶
func WithOptimizersConfig(config *qdrant.OptimizersConfigDiff) CreateCollectionOption
func WithProductQuantization ¶
func WithProductQuantization(config *qdrant.ProductQuantization) CreateCollectionOption
func WithReplicationFactor ¶
func WithReplicationFactor(factor uint32) CreateCollectionOption
func WithScalarQuantization ¶
func WithScalarQuantization(config *qdrant.ScalarQuantization) CreateCollectionOption
func WithShardNumber ¶
func WithShardNumber(number uint32) CreateCollectionOption
func WithShardingMethod ¶
func WithShardingMethod(method qdrant.ShardingMethod) CreateCollectionOption
func WithSparseVectorsConfig ¶
func WithSparseVectorsConfig(params map[string]*qdrant.SparseVectorParams) CreateCollectionOption
func WithVectorConfig ¶
func WithVectorConfig(params *qdrant.VectorParams) CreateCollectionOption
func WithVectorConfigMap ¶
func WithVectorConfigMap(params map[string]*qdrant.VectorParams) CreateCollectionOption
func WithWalConfig ¶
func WithWalConfig(config *qdrant.WalConfigDiff) CreateCollectionOption
func WithWriteConsistencyFactor ¶
func WithWriteConsistencyFactor(factor uint32) CreateCollectionOption
type DeleteCollectionOption ¶
type DeleteCollectionOption func(c *qdrant.DeleteCollection)
============ BEGIN DELETE COLLECTION OPTIONS ==============
func WithDeleteTimeout ¶
func WithDeleteTimeout(timeout uint64) DeleteCollectionOption
type GrpcClient ¶
type GrpcClient struct { Qdrant qdrant.QdrantClient Collections qdrant.CollectionsClient Points qdrant.PointsClient Snapshots qdrant.SnapshotsClient // contains filtered or unexported fields }
func NewGrpcClient ¶
func NewGrpcClient(ctx context.Context, config *Config) (*GrpcClient, error)
connect connect to Service
func NewGrpcClientFromConn ¶
func NewGrpcClientFromConn(conn *grpc.ClientConn) *GrpcClient
type UpsertPointsOption ¶
type UpsertPointsOption func(c *grpc.UpsertPoints)
func WithPoints ¶
func WithPoints(points []*grpc.PointStruct) UpsertPointsOption
func WithUpsertOrdering ¶
func WithUpsertOrdering(ordering grpc.WriteOrderingType) UpsertPointsOption
func WithUpsertShardKeySelector ¶
func WithUpsertShardKeySelector(shardKeys []*grpc.ShardKey) UpsertPointsOption
func WithUpsertWait ¶
func WithUpsertWait(wait bool) UpsertPointsOption
Source Files
¶
Click to show internal directories.
Click to hide internal directories.