Skip to content

Upsert batch limit undocumented #98

@ArjunJagdale

Description

@ArjunJagdale

index.upsert() accepts any size list but throws ValueError: Cannot insert more than 1000 vectors at a time only after processing
Should either auto-batch internally or document the limit clearly in the method signature.

Good way for now -

    batch_size = 1000
    for i in range(0, len(vectors), batch_size):
        batch = vectors[i : i + batch_size]
        index.upsert(batch)
        print(f"UPSERTED batch {i // batch_size + 1} — {len(batch)} vectors")
    print(f"UPSERTED {len(vectors)} vectors")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions