Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neighbors step #2389

Merged
merged 2 commits into from
Sep 8, 2021
Merged

Commits on Aug 9, 2021

  1. Improve subgraph performance with persistent backends

    Do just one call to get all the edges for the given nodes, instead of
    one call for each node.
    
    This new call has been added as a new method to Graph and Backends.
    GetNodesEdges, return the list with all edges for a list of nodes.
    
    Batching is used to avoid hitting the max number of clauses set by ES
    (is set to the default value of 512).
    adrianlzt committed Aug 9, 2021
    Configuration menu
    Copy the full SHA
    e455f7a View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2021

  1. Neighbors step

    Like Descendants, but using edges in any direction (Descendants only
    uses edges from parent to child, Neighbors uses from parent to child and
    from child to parent).
    
    The different with the Both step, is Neighbors accumulate nodes seen.
    Example (pseudo-syntax):
    A -> B -> C
    G.V(A).Out().Out() return: C.
    
    But:
    G.V(A).Neighbors(2) return: A,B,C
    
    The parameters allowed are the same as in Descendants.
    Example:
    G.V('foo').Neighbors('RelationType',Within('ownership','foobar'),2)
    
    To improve speed and reduce backend load when using persistent backends,
    a new method, GetNodesFromIDs, is implemented in Graph and Backends.
    This method only uses one call (or a few in we have hundreds of nodes,
    see batching) to get all nodes from the backend.
    
    Batching is used to avoid hitting the max number of clauses set by ES
    (is set to the default value of 512).
    adrianlzt committed Aug 20, 2021
    Configuration menu
    Copy the full SHA
    14bcafe View commit details
    Browse the repository at this point in the history