Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Don't try to store 7 million items in a Neo4j property -- you're right, that's wrong.</p> <p>Redis and Neo4j often make a good pairing, but I don't quite understand what you're trying to do or what you mean in "d" -- what are the key/value pairs, and how do they relate to the nodes and relationships in the graph? Examples would help.</p> <p>UPDATE: The most natural way to do this with a graph database is to store it as a property on the edge between the two nodes. Then you can use Gremlin to get its value.</p> <p>For example, to return a property on an edge that exists between two vertices (nodes) that have some properties:</p> <pre><code>start = g.idx('vertices')[[key:value]] // start vertex edge = start.outE(label).as('e') // edge end = edge.inV.filter{it.someprop == somevalue} // end vertex prop = end.back('e').prop // edge property return prop </code></pre> <p>You could store it in an index like you suggested, but this adds more complexity to your system, and if you need to reference the data as part of the traversal, then you will either have to store duplicate data or look it up in Redis during the traversal, which you can do, see:</p> <p>Have Gremlin Talk to Redis in Real Time while It's Walking the Graph <a href="https://groups.google.com/d/msg/gremlin-users/xhqP-0wIg5s/bxkNEh9jSw4J" rel="nofollow">https://groups.google.com/d/msg/gremlin-users/xhqP-0wIg5s/bxkNEh9jSw4J</a></p> <p>UPDATE 2: </p> <p>If the ID of vertex <code>a</code> and <code>b</code> are known ahead of time, then it's even easier: </p> <pre><code>g.v(a).outE(label).filter{it.inVertex.id == b}.prop </code></pre> <p>If vertex <code>a</code> and <code>b</code> are known ahead of time, then it's: </p> <pre><code>a.outE(label).filter{it.inVertex == b}.prop </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload