Open anuraaga opened 1 month ago
Hi @anuraaga, thanks a lot for the great suggestions. You're right, the ergonomics of working with namespaces within an IndexConnection
could be improved.
We've added a ticket to take a look at this in an upcoming sprint, thanks again. 👍
What motivated you to submit this feature request?
IndexConnection
is tied to a single namespace, which is passed in request messages. This means we need anIndexConnection
per namespace even though there is no reason the same gRPC connection couldn't be used for all of them. For a service that has downstream requests that are segmented by namespace (e.g., a namespace per tenant in a multi-tenant system), either a connection pool needs to be maintained or connection is opened/closed per request. Both have some complexity or overhead that shouldn't be required for a gRPC request parameter.Describe the solution you'd like A clear and concise description of what you want to happen.
Methods that can operate on a single namespace passed by the user. Some approaches could be
UpsertVectorsNamespace
, which follows the pattern of methods in the standard library that accept context,slog.Info
/slog.InfoContext
.context.Context
to keep the same current signatures, e.g.UpsertVectors(pinecone.ContextWithNamespace(ctx, "my-namespace"), vectors)
Index
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
If the gRPC generated code was public we could try using it directly, and otherwise we may need to use the protos and generate ourselves.
Additional context Add any other context or screenshots about the feature request here.