pinecone

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package pinecone implements the vectorstore.Store interface for Pinecone.

Index

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
}

Client implements vectorstore.Store for Pinecone.

func New

func New(ctx context.Context, host string, apiKey string) (*Client, error)

New creates a new Pinecone client. host should be the full Pinecone index host (from the Pinecone console). API key is read from PINECONE_API_KEY environment variable if not provided.

func (*Client) Close

func (c *Client) Close() error

Close releases resources (no-op for HTTP client).

func (*Client) Count

func (c *Client) Count(ctx context.Context, collection string) (int64, error)

Count returns the number of vectors in a namespace.

func (*Client) DeleteCollection

func (c *Client) DeleteCollection(ctx context.Context, name string) error

DeleteCollection deletes all vectors in a namespace.

func (*Client) EnsureCollection

func (c *Client) EnsureCollection(ctx context.Context, name string, dim int) error

EnsureCollection is a no-op for Pinecone (index must be created via console/API). Pinecone uses namespaces within an index, which are created automatically on upsert.

func (*Client) Search

func (c *Client) Search(ctx context.Context, collection string, vector []float32, topK int) ([]vectorstore.Result, error)

Search performs similarity search and returns top-k results.

func (*Client) Upsert

func (c *Client) Upsert(ctx context.Context, collection string, points []vectorstore.Point) error

Upsert inserts or updates vectors in the index.

Jump to

Keyboard shortcuts

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