Skip to content

.Net: Typed collections limit code reuse #10872

Closed as not planned
Closed as not planned
@markwallace-microsoft

Description

@markwallace-microsoft

The current approach requires different code for each storage type, making it hard to switch storage backends without modifying the code.
Example inconsistencies:

  • Qdrant: GetCollection<Guid, object> or GetCollection<Guid, ulong>
  • Weaviate: GetCollection<Guid, object>
  • Azure AI Search: GetCollection<string, object>
  • Sqlite: GetCollection<Guid, object> or GetCollection<Guid, ulong>
  • Postgres: supports short, int, long, string, Guid, but not ulong
  • AzureCosmosDbNoSQL: allows composite keys

Suggestion: introduce a more general abstraction that allows using different storage backends without requiring code changes. Don’t force .NET “generics” unless they are consistent across storage engines.

Metadata

Metadata

Assignees

Labels

.NETIssue or Pull requests regarding .NET codeNextSemestermsft.ext.vectordataRelated to Microsoft.Extensions.VectorData

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions