Documentation
¶
Index ¶
- type Adapter
- func (a *Adapter) Close() error
- func (a *Adapter) CollectionExists(ctx context.Context, name string) (bool, error)
- func (a *Adapter) CreateCollection(ctx context.Context, name string, schema *vectordb.CollectionSchema) error
- func (a *Adapter) CreateDocument(ctx context.Context, collectionName string, doc *vectordb.Document) error
- func (a *Adapter) CreateDocuments(ctx context.Context, collectionName string, docs []*vectordb.Document) error
- func (a *Adapter) DeleteCollection(ctx context.Context, name string) error
- func (a *Adapter) DeleteDocument(ctx context.Context, collectionName, id string) error
- func (a *Adapter) DeleteDocuments(ctx context.Context, collectionName string, ids []string) error
- func (a *Adapter) DeleteDocumentsByMetadata(ctx context.Context, collectionName string, metadata map[string]interface{}) error
- func (a *Adapter) GetCollectionCount(ctx context.Context, name string) (int64, error)
- func (a *Adapter) GetCollectionInfo(ctx context.Context, name string) (*vectordb.CollectionInfo, error)
- func (a *Adapter) GetDefaultSchema(schemaType vectordb.SchemaType, collectionName string) *vectordb.CollectionSchema
- func (a *Adapter) GetDocument(ctx context.Context, collectionName, id string) (*vectordb.Document, error)
- func (a *Adapter) GetDocumentsByMetadata(ctx context.Context, collectionName string, metadata map[string]interface{}, ...) ([]*vectordb.Document, error)
- func (a *Adapter) GetSchema(ctx context.Context, name string) (*vectordb.CollectionSchema, error)
- func (a *Adapter) Health(ctx context.Context) error
- func (a *Adapter) ListCollections(ctx context.Context) ([]vectordb.CollectionInfo, error)
- func (a *Adapter) ListDocuments(ctx context.Context, collectionName string, limit int, offset int) ([]*vectordb.Document, error)
- func (a *Adapter) SearchBM25(ctx context.Context, collectionName, query string, ...) ([]*vectordb.QueryResult, error)
- func (a *Adapter) SearchByMetadata(ctx context.Context, collectionName string, metadata map[string]interface{}, ...) ([]*vectordb.QueryResult, error)
- func (a *Adapter) SearchHybrid(ctx context.Context, collectionName, query string, ...) ([]*vectordb.QueryResult, error)
- func (a *Adapter) SearchSemantic(ctx context.Context, collectionName, query string, ...) ([]*vectordb.QueryResult, error)
- func (a *Adapter) UpdateDocument(ctx context.Context, collectionName string, doc *vectordb.Document) error
- func (a *Adapter) UpdateSchema(ctx context.Context, name string, schema *vectordb.CollectionSchema) error
- func (a *Adapter) ValidateSchema(s *vectordb.CollectionSchema) error
- type Factory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter wraps the Pinecone client to implement the vectordb.VectorDBClient interface
func NewAdapter ¶
NewAdapter creates a new Pinecone adapter from the vectordb.Config
func (*Adapter) CollectionExists ¶
CollectionExists checks if a Pinecone index exists
func (*Adapter) CreateCollection ¶
func (a *Adapter) CreateCollection(ctx context.Context, name string, schema *vectordb.CollectionSchema) error
CreateCollection creates a new Pinecone index
func (*Adapter) CreateDocument ¶
func (a *Adapter) CreateDocument(ctx context.Context, collectionName string, doc *vectordb.Document) error
CreateDocument creates a new document (vector) in Pinecone
func (*Adapter) CreateDocuments ¶
func (a *Adapter) CreateDocuments(ctx context.Context, collectionName string, docs []*vectordb.Document) error
CreateDocuments batch creates multiple documents in Pinecone
func (*Adapter) DeleteCollection ¶
DeleteCollection deletes a Pinecone index
func (*Adapter) DeleteDocument ¶
DeleteDocument deletes a document by ID from Pinecone
func (*Adapter) DeleteDocuments ¶
DeleteDocuments batch deletes multiple documents from Pinecone
func (*Adapter) DeleteDocumentsByMetadata ¶
func (a *Adapter) DeleteDocumentsByMetadata(ctx context.Context, collectionName string, metadata map[string]interface{}) error
DeleteDocumentsByMetadata deletes documents by metadata filter
func (*Adapter) GetCollectionCount ¶
GetCollectionCount returns the number of documents in a Pinecone index
func (*Adapter) GetCollectionInfo ¶
func (a *Adapter) GetCollectionInfo(ctx context.Context, name string) (*vectordb.CollectionInfo, error)
GetCollectionInfo returns information about a specific Pinecone index
func (*Adapter) GetDefaultSchema ¶
func (a *Adapter) GetDefaultSchema(schemaType vectordb.SchemaType, collectionName string) *vectordb.CollectionSchema
GetDefaultSchema returns a default schema for Pinecone
func (*Adapter) GetDocument ¶
func (a *Adapter) GetDocument(ctx context.Context, collectionName, id string) (*vectordb.Document, error)
GetDocument retrieves a document by ID from Pinecone
func (*Adapter) GetDocumentsByMetadata ¶
func (a *Adapter) GetDocumentsByMetadata(ctx context.Context, collectionName string, metadata map[string]interface{}, limit int) ([]*vectordb.Document, error)
GetDocumentsByMetadata retrieves documents by metadata filter
func (*Adapter) ListCollections ¶
ListCollections lists all Pinecone indexes
func (*Adapter) ListDocuments ¶
func (a *Adapter) ListDocuments(ctx context.Context, collectionName string, limit int, offset int) ([]*vectordb.Document, error)
ListDocuments lists documents in a Pinecone index
func (*Adapter) SearchBM25 ¶
func (a *Adapter) SearchBM25(ctx context.Context, collectionName, query string, options *vectordb.QueryOptions) ([]*vectordb.QueryResult, error)
SearchBM25 performs keyword-based search
func (*Adapter) SearchByMetadata ¶
func (a *Adapter) SearchByMetadata(ctx context.Context, collectionName string, metadata map[string]interface{}, options *vectordb.QueryOptions) ([]*vectordb.QueryResult, error)
SearchByMetadata searches documents by metadata filters
func (*Adapter) SearchHybrid ¶
func (a *Adapter) SearchHybrid(ctx context.Context, collectionName, query string, options *vectordb.QueryOptions) ([]*vectordb.QueryResult, error)
SearchHybrid performs hybrid search combining vector and keyword
func (*Adapter) SearchSemantic ¶
func (a *Adapter) SearchSemantic(ctx context.Context, collectionName, query string, options *vectordb.QueryOptions) ([]*vectordb.QueryResult, error)
SearchSemantic performs a semantic search in Pinecone
func (*Adapter) UpdateDocument ¶
func (a *Adapter) UpdateDocument(ctx context.Context, collectionName string, doc *vectordb.Document) error
UpdateDocument updates an existing document in Pinecone
func (*Adapter) UpdateSchema ¶
func (a *Adapter) UpdateSchema(ctx context.Context, name string, schema *vectordb.CollectionSchema) error
UpdateSchema updates a collection's schema
func (*Adapter) ValidateSchema ¶
func (a *Adapter) ValidateSchema(s *vectordb.CollectionSchema) error
ValidateSchema validates a schema for Pinecone
type Factory ¶
type Factory struct{}
Factory implements vectordb.ClientFactory for Pinecone
func (*Factory) CreateClient ¶
CreateClient creates a new Pinecone client
func (*Factory) GetSupportedTypes ¶
func (f *Factory) GetSupportedTypes() []vectordb.VectorDBType
GetSupportedTypes returns the database types supported by this factory