Skip to content

.Net: [MEVD] IVectorStore implementations should return the concrete collection types #11759

@roji

Description

@roji

PostgresVectorStore.GetCollection() currently returns the abstraction interface IVectorStoreRecordCollection<TKey, TRecord>; if a user then wishes to use a PG-specific API on the collection, they then must downcast the interface. This makes it awkward to both use the IVectorStore implementation (as a factory for collection instances) and use connector-specific APIs.

We can simply have GetCollection() return a PostgresVectorStoreRecordCollection, and have an explicit interface implementation to implement the required IVectorStore interface method.

Metadata

Metadata

Assignees

Labels

.NETIssue or Pull requests regarding .NET codeBuildFeatures planned for next Build conferencemsft.ext.vectordataRelated to Microsoft.Extensions.VectorData

Type

No type

Projects

Status

Sprint: Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions