Skip to content

Add an optional node label in external retrievers to optimize the match query #344

@stellasia

Description

@stellasia

It would be good to be able to filter on a node label in external retrievers (i.e. WeaviateNeo4jRetriever, QdrantNeo4jRetriever and PineconNeo4jRetriever) like this:

retriever = WeaviateNeo4jRetriever(
    driver=driver,
    client=client,
    collection="Entities",
    id_property_external="entity_id",
    id_property_neo4j="name",
    node_label="Entity",  # ADD THIS
)

and then update the get_match_query function to take into account this node_label in the Cypher query if provided.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions