Skip to content

[Feature Request] I have a request stating that I need all the metadata which I had 35k vectors upserted. #407

Open

Description

@crtejavardhanreddy

What motivated you to submit this feature request?
Get all the metadata is a requirement in my project

Describe the solution you'd like
Just GET the pinecone metadata data without any matches with the any vectors.
My metadata consists of Source as a key and links as a value that I need to get the all data

Describe alternatives you've considered
Checking the Pinecone docs data

Additional context
{9456A24C-9589-4948-BA9D-B51556F8EE2D}

Activity

  1. jhamon commented on Oct 29, 2024

    @jhamon
    Collaborator

    You can use fetch to get a record, including metadata, by id. Does something like this cover your use case?

    from pinecone import Pinecone; 
    
    pc = Pinecone(api_key='your-api-key')
    index = pc.Index('jen2')
    
    pc.describe_index('jen2')
    # {
    #     "name": "jen2",
    #     "dimension": 2,
    #     "metric": "cosine",
    #     "host": "jen2-dojoi3u.svc.aped-4627-b74a.pinecone.io",
    #     "spec": {
    #         "serverless": {
    #             "cloud": "aws",
    #             "region": "us-east-1"
    #         }
    #     },
    #     "status": {
    #         "ready": true,
    #         "state": "Ready"
    #     },
    #     "deletion_protection": "disabled"
    # }
    
    index.upsert(vectors=[('1', [0.2, 0.3], {"genre": "comedy", "rating": 4 })])
    # {'upserted_count': 1}
    
    index.fetch(ids=['1'])
    # {'namespace': '',
    #  'usage': {'read_units': 1},
    #  'vectors': {'1': {'id': '1',
    #                    'metadata': {'genre': 'comedy', 'rating': 4.0},
    #                    'values': [0.2, 0.3]}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions