Skip to content

[Feature Request] Allow IndexConnection to be used with multiple namespaces #81

@anuraaga

Description

@anuraaga

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 an IndexConnection 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

  • additional version of each method, e.g. UpsertVectorsNamespace, which follows the pattern of methods in the standard library that accept context, slog.Info / slog.InfoContext.
  • pass it in context.Context to keep the same current signatures, e.g. UpsertVectors(pinecone.ContextWithNamespace(ctx, "my-namespace"), vectors)
  • Create a new class with same methods as current but accept namespace, e.g. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requeststatus:needs-triageAn issue that needs to be triaged by the Pinecone team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions