Change Password

Please enter the password.
Please enter the password. Between 8-64 characters. Not identical to your email address. Contain at least 3 of: uppercase, lowercase, numbers, and special characters.
Please enter the password.
Submit

Change Nickname

Current Nickname:
Submit

Apply New License

License Detail

Please complete this required field.

  • Ultipa Graph V4

Standalone

Please complete this required field.

Please complete this required field.

The MAC address of the server you want to deploy.

Please complete this required field.

Please complete this required field.

Cancel
Apply
ID
Product
Status
Cores
Applied Validity Period(days)
Effective Date
Excpired Date
Mac Address
Apply Comment
Review Comment
Close
Profile
  • Full Name:
  • Phone:
  • Company:
  • Company Email:
  • Country:
  • Language:
Change Password
Apply

You have no license application record.

Apply
Certificate Issued at Valid until Serial No. File
Serial No. Valid until File

Not having one? Apply now! >>>

Product Created On ID Amount (USD) Invoice
Product Created On ID Amount (USD) Invoice

No Invoice

v5.0
Search
    English
    v5.0

      Graph Patterns

      Overview

      A graph pattern is to match a list of path patterns in the graph and is composed of three successive parts:

      <graph pattern> ::= 
        [ <match mode> ] <path pattern list> [ <graph pattern where clause> ]
      
      <path pattern list> ::= <path pattern> [ { "," <path pattern> }... ]
      

      The path pattern list consists of one or multiple path patterns, enabling the construction of more complex patterns that cannot be expressed by a single path pattern.

      Each path pattern is independently matched against the graph, producing a set of paths. These sets are either equi-joined on the common variables (if any exist) or combined using the Cartesian product.

      Example Graph

      The following examples run against this graph:

      To create this graph, run the following query against an empty graph:

      INSERT (brainy:User {_id: "U01", name: "Brainy"}),
             (rowlock:User {_id: "U02", name: "rowlock"}),
             (purplechalk:User {_id: "U03", name: "purplechalk"}),
             (quickfox:User {_id: "U04", name: "QuickFox"}),
             (quasar92:User {_id: "U05", name: "Quasar92"}),
             (mochaeach:User {_id: "U06", name: "mochaeach"}),
             (london:City {_id: "C01", name: "London"}),
             (newyork:City {_id: "C02", name: "New York"}),
             (rowlock)-[:Follows]->(brainy),
             (purplechalk)-[:Follows]->(brainy),
             (quickfox)-[:Follows]->(brainy),
             (rowlock)-[:Follows]->(mochaeach),
             (purplechalk)-[:Follows]->(mochaeach),
             (quickfox)-[:Follows]->(mochaeach),
             (quasar92)-[:Follows]->(mochaeach),
             (quickfox)-[:LivesIn]->(london),
             (rowlock)-[:LivesIn]->(newyork),
             (purplechalk)-[:LivesIn]->(newyork)
      

      Connected Paths

      To get common followers of Brany and mochaeach who live in New York:

      MATCH (:User {name: 'Brainy'})<-[:Follows]-(u:User)-[:Follows]->(:User {name: 'mochaeach'}), 
            (u)-[:LivesIn]->(:City {name: 'New York'})
      RETURN u.name
      

      The two path patterns have a common variable u, thus equi-join is performed:

      Result:

      u.name
      rowlock
      purplechalk

      Disconnected Paths

      This graph pattern finds users who follow Brainy and users who live in New York:

      MATCH (u1:User)-[:Follows]->(:User {name: 'Brainy'}),
            (u2:User)-[:LivesIn]->(:City {name: 'New York'})
      RETURN u1.name, u2.name
      

      The two path patterns have no common variable, thus Cartesian product is performed:

      Result:

      u1.name u2.name
      rowlock rowlock
      rowlock purplechalk
      purplechalk rowlock
      purplechalk purplechalk
      QuickFox rowlock
      QuickFox purplechalk

      Match Mode

      This feature is not yet supported.

      A graph pattern may optionally specify a match mode that applies to all path patterns contained in the graph pattern.

      There are two match modes:

      • DIFFERENT EDGES: A matched edge is not permitted to bind to more than one edge variable. There are no restrictions on matched nodes.
      • REPEATABLE ELEMENTS: There are no restrictions on matched edges or matched nodes. It is implicit when no match mode is specified.

      <match mode> ::= 
        <repeatable elements match mode> | <different edges match mode>
        
      <repeatable elements match mode> ::= "REPEATABLE ELEMENTS"
      
      <different edges match mode> ::= "DIFFERENT EDGES"
      

      This query finds nodes those connected to U01, but also have connections with other nodes besides U01:

      MATCH DIFFERENT EDGES (:User {name: "QuickFox"})-[e1]-(n), (n)-[e2]-(m)
      RETURN DISTINCT n
      

      Records that ensure edges are uniquely bound to different variables are retained. Therefore, only nodes U03 and C01 are returned.

      If the match mode is DIFFERENT EDGES and if an edge variable has been multiply declared within a graph pattern, then no results are return. See the following two examples:

      MATCH DIFFERENT EDGES ()-[e]->(), ()-[e]->()
      RETURN e
      

      MATCH DIFFERENT EDGES ()-[e]->()-[e]->()
      RETURN e
      
      Please complete the following information to download this book
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写