topic Re: Cypher has variable-length "line"-of-arrows matching, but does it have variable-size "grid" matching? in Neo4j Graph Platform
https://community.neo4j.com/t5/neo4j-graph-platform/cypher-has-variable-length-quot-line-quot-of-arrows-matching-but/m-p/7530#M347
<P>Hi <A class="mention" href="https://community.neo4j.com/u/fruitfulapproach">@fruitfulapproach</A> !</P>
<P>So, if I understand correctly you want to get from A to B' by doing a 2-hop search from two directions (through B and through A')?</P>
<P>If this is the case, the variable-length pattern matching actually does that, it doesn't go just from A to B or from A to A' , exclusively, but from every relationship that A has.</P>
<P>Please let me know if this is useful or if you have more details for the case you want to solve!</P>Fri, 25 Mar 2022 01:53:14 GMTluiseduardo2022-03-25T01:53:14ZCypher has variable-length "line"-of-arrows matching, but does it have variable-size "grid" matching?
https://community.neo4j.com/t5/neo4j-graph-platform/cypher-has-variable-length-quot-line-quot-of-arrows-matching-but/m-p/7529#M346
<P>I know you can search for "any number of arrows" using <A href="https://neo4j.com/docs/cypher-manual/current/syntax/patterns/#cypher-pattern-varlength" rel="noopener nofollow ugc">Variable-length pattern matching</A></P>
<P>So that matches a "line of arrows" if you will, of any length.</P>
<P>But can you match a "grid of arrows" of any size, ie. a 2D grid, possibly even 3D if it can be done for 2D?</P>
<PRE><CODE class="lang-auto">A -> B -> C -> ... -> D
| | | |
V V V V
A'-> B'-> C'-> ... -> D'
. . . .
. . . .
. . . .
| | | |
V V V V
A''->B''->C''-> ... ->D''
</CODE></PRE>
<P>That is what I mean as a generalization of the 1D case, a 2D grid of any size. Where, for this question, each square in the grid is bounded by exactly 4 arrows or "sides".</P>
<P>If it Cypher doesn't directly support this, then what would be the most optimal way of implementing it using Neo4j's suite of technology?</P>Sun, 09 Jan 2022 02:04:14 GMThttps://community.neo4j.com/t5/neo4j-graph-platform/cypher-has-variable-length-quot-line-quot-of-arrows-matching-but/m-p/7529#M346fruitfulapproac2022-01-09T02:04:14ZRe: Cypher has variable-length "line"-of-arrows matching, but does it have variable-size "grid" matching?
https://community.neo4j.com/t5/neo4j-graph-platform/cypher-has-variable-length-quot-line-quot-of-arrows-matching-but/m-p/7530#M347
<P>Hi <A class="mention" href="https://community.neo4j.com/u/fruitfulapproach">@fruitfulapproach</A> !</P>
<P>So, if I understand correctly you want to get from A to B' by doing a 2-hop search from two directions (through B and through A')?</P>
<P>If this is the case, the variable-length pattern matching actually does that, it doesn't go just from A to B or from A to A' , exclusively, but from every relationship that A has.</P>
<P>Please let me know if this is useful or if you have more details for the case you want to solve!</P>Fri, 25 Mar 2022 01:53:14 GMThttps://community.neo4j.com/t5/neo4j-graph-platform/cypher-has-variable-length-quot-line-quot-of-arrows-matching-but/m-p/7530#M347luiseduardo2022-03-25T01:53:14Z