Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Bug] Incorrect typing in IndexAsyncio.query method for filter parameter. #461

Copy link
Copy link
@DevParapalli

Description

@DevParapalli
Issue body actions

Is this a new bug?

  • I believe this is a new bug
  • I have searched the existing Github issues and Community Forum, and I could not find an existing post for this bug

Not necessarily, but I encountered it while converting my code to use v6

Describe the bug
Filter parameter is typed to accept only {'$eq':'value'} rather than {'key':{'$eq':'value'}}

Error information
No errors, just a typing issue.

Steps to reproduce the issue locally

async def vdb_entity_query(vector: list[float], namespace: str, entity: str, top_k: int = 1):
    async with PineconeAsyncio(os.getenv("PINECONE_API_KEY")).IndexAsyncio(host=__HOST_ADDR__) as index:
        return await index.query(
            vector=vector,
            top_k=top_k,
            namespace=namespace,
            include_metadata=True,
            include_values=False,
            filter={"entity":{"$eq": entity}}, 
        )

Environment

  • OS Version: Microsoft Windows 11 Enterprise 10.0.22000 Build 22000
  • Python version: 3.12.9
  • Python SDK version: 6.0.1

Additional context
I do not like red squiggly lines under my code.

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingSomething isn't workingstatus:needs-triageAn issue that needs to be triaged by the Pinecone teamAn 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

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.