# Display a path from a specific relationship

**URL:** <https://community.neo4j.com/t/display-a-path-from-a-specific-relationship/69843>\
**Category:** Cypher\
**Created:** [September 25, 2024, 6:20am UTC](https://community.neo4j.com/t/display-a-path-from-a-specific-relationship/69843 "2024-09-25T06:20:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![syolbe1](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/syolbe1/32/32796_2.png) [@syolbe1](https://community.neo4j.com/u/syolbe1)\
**Post date:** [September 25, 2024, 6:20am UTC](https://community.neo4j.com/t/display-a-path-from-a-specific-relationship/69843/1 "2024-09-25T06:20:55Z")

</div>

how to display a path built from a specific relationship between 2 nodes, and specify the number of hops.  
Example:  
I want only paths with 3 \* [r] or more. It should return A, B, C, D, but not E, F, G, H  
(A)-[r]-(B)-[r]-(C)-[r]-(D)  
(E)-[r]-(F)-[r]-(G)  
(F)-[r]-(H)

---

<div class="post-metadata">

**Author:** ![syolbe1](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/syolbe1/32/32796_2.png) [@syolbe1](https://community.neo4j.com/u/syolbe1)\
**Post date:** [September 25, 2024, 6:58am UTC](https://community.neo4j.com/t/display-a-path-from-a-specific-relationship/69843/2 "2024-09-25T06:58:30Z")

</div>

basically I want to extract the path A-D, not the others

 ![image](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/3X/d/d/dd31e29e846a2aee5887101ef13bd43e111f9715.png)

---

<div class="post-metadata">

**Author:** ![syolbe1](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/syolbe1/32/32796_2.png) [@syolbe1](https://community.neo4j.com/u/syolbe1)\
**Post date:** [September 25, 2024, 7:02am UTC](https://community.neo4j.com/t/display-a-path-from-a-specific-relationship/69843/3 "2024-09-25T07:02:03Z")

</div>

this is working, but I have other much complicated graphs, where it didn't work... I need to understand why.

 ![image](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/3X/9/3/9373ab11fd62d8bf326c9e69899c209759ffd1d6.png)

---

<div class="post-metadata">

**Author:** ![glilienfield](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/glilienfield/32/27534_2.png) [@glilienfield](https://community.neo4j.com/u/glilienfield)\
**Post date:** [September 25, 2024, 8:35pm UTC](https://community.neo4j.com/t/display-a-path-from-a-specific-relationship/69843/4 "2024-09-25T20:35:26Z")

</div>

Your variable length search is specifying one to three hops. If you want three or more hops, then you need to use `*3..` instead of `*3`
