Documentation ¶
Index ¶
- type Client
- func (c *Client) CloseConnection() error
- func (c *Client) CreateIndex(ctx context.Context, name string) error
- func (c *Client) DeleteIndex(ctx context.Context, name string) error
- func (c *Client) DeleteIndexIfExists(ctx context.Context, name string) error
- func (c *Client) IndexExists(ctx context.Context, name string) (bool, error)
- func (c *Client) Insert(ctx context.Context, indexName string, id uint, vec []float32) error
- func (c *Client) SearchKNN(indexName string, vector []float32, k int) ([]*Hit, error)
- type Hit
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
}
A Client to the HNSW service. It provides essential functionalities for managing indices, and inserting and searching vectors.
func (*Client) CloseConnection ¶
CloseConnection closes the underlying gRPC connection.
func (*Client) CreateIndex ¶
CreateIndex creates a new HNSW index.
func (*Client) DeleteIndex ¶
DeleteIndex deletes an HNSW index.
func (*Client) DeleteIndexIfExists ¶
DeleteIndexIfExists deletes an HNSW index only if it exists, otherwise it does nothing.
func (*Client) IndexExists ¶
IndexExists reports whether an HNSW index exists.
Click to show internal directories.
Click to hide internal directories.