Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9146307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:43:09+00:00 2026-06-17T10:43:09+00:00

I’m trying to query nodes via Cypher with a specific relationship type. So there

  • 0

I’m trying to query nodes via Cypher with a specific relationship type.

So there are two nodes A (ID 1) and B (ID 2).
I’m using the Cypher Console within the Administration GUI.

If I do this:
rel:1

I get a result of two relationships (IDs 10 and 11) two the same node (ID 3) (I know that is bad but that’s the data).
If I look into the relationships there is shown:
Node 1 SimilarTo Node 3
Node 1 SimilarTo Node 3

If I try this:

START n=node(*) MATCH n-[:SimilarTo]->b WHERE n.Name='A'

I get an empty result!?

So my question is, why do I get that empty result, although there exist two relationships which have the right start node and the right end nodes?

I do not understand it.

If you have any suggestions please let me know 😉

OK I make another example..

I do following query:

START artist=node:artists('artistMbid:*')
MATCH artist-[:SimilarTo]->x-[:SimilarTo]->sim
WHERE artist.artistName! = 'Shining Fury' 
RETURN artist.artistName, x.artistName, sim.artistName                             

And get this result (is correct):

artist.artistName x.artistName sim.artistName
"Shining Fury"  "Dragonsfire"   "Holy Cross"
"Shining Fury"  "Dragonsfire"   "Holy Cross"
"Shining Fury"  "Dragonsfire"   "Lorenguard"
"Shining Fury"  "Dragonsfire"   "Lorenguard"
"Shining Fury"  "Dragonsfire"   "Shining Fury"
"Shining Fury"  "Dragonsfire"   "Shining Fury"

If I do that:

START artist=node:artists('artistMbid:*')
MATCH artist-[:SimilarTo]->x-[:SimilarTo]->y-[:SimilarTo]->sim
WHERE artist.artistName! = 'Shining Fury' 
RETURN artist.artistName, x.artistName, y.artistName, sim.artistName

I get this (incorrect):

artist.artistName x.artistName y.artistName   sim.artistName
"Shining Fury"  "Dragonsfire"   "Holy Cross"    "Dragonsfire"
"Shining Fury"  "Dragonsfire"   "Holy Cross"    "Ruffians"
"Shining Fury"  "Dragonsfire"   "Holy Cross"    "Dragonsfire"
"Shining Fury"  "Dragonsfire"   "Holy Cross"    "Ruffians"
"Shining Fury"  "Dragonsfire"   "Lorenguard"    "Holy Cross"
"Shining Fury"  "Dragonsfire"   "Lorenguard"    "Nightqueen"
"Shining Fury"  "Dragonsfire"   "Lorenguard"    "Dragonsfire"
"Shining Fury"  "Dragonsfire"   "Lorenguard"    "Holy Cross"
"Shining Fury"  "Dragonsfire"   "Lorenguard"    "Nightqueen"
"Shining Fury"  "Dragonsfire"   "Lorenguard"    "Dragonsfire"

It is incorrect because I’m missing The artist “Shining Fury” under y.artistName, like I got it in the step before.
I can’t find my mistake!

Another edit..

Query 1

START artist=node:artists('artistMbid:*')
MATCH artist-[:SimilarTo]->x-[:SimilarTo]->sim
WHERE artist.artistName! = 'Shining Fury' 
RETURN ID(artist), ID(x), ID(sim)

result:

ID(artist) ID(x) ID(sim)
210292  209410  228580
210292  209410  228580
210292  209410  212568
210292  209410  212568
210292  209410  210292
210292  209410  210292

Query2:

START artist=node:artists('artistMbid:*')
MATCH artist-[:SimilarTo]->x-[:SimilarTo]->y-[:SimilarTo]->sim
WHERE artist.artistName! = 'Shining Fury' 
RETURN ID(artist), ID(x), ID(y), ID(sim)

result:

ID(artist) ID(x) ID(y) ID(sim)
210292  209410  228580  209410
210292  209410  228580  202357
210292  209410  228580  209410
210292  209410  228580  202357
210292  209410  212568  228580
210292  209410  212568  202279
210292  209410  212568  209410
210292  209410  212568  228580
210292  209410  212568  202279
210292  209410  212568  209410
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:43:10+00:00Added an answer on June 17, 2026 at 10:43 am

    i see no problem in there:

    artist-[:SimilarTo]->x-[:SimilarTo]->sim

    gives you identifiers artist and sim where in some cases the artist=sim. whereas

    artist-[:SimilarTo]->x-[:SimilarTo]->y-[:SimilarTo]->sim

    gives you identifiers artist, x, y, sim where the y<>artist because it is folowed by sim -> i mean, if you will be given the same identifier as in the first case, than the cypher match would run into an infinite loop, i.e. 210292 209410 210292 209410 (i bet the “Shining Fury” has connection only to “DragonsFly” and thus there simply can’t be another sim identifier other than again the “DragonsFly”.

    try to add 1 more identifier and you will also see the part of the first query, e.g.:

    artist-[:SimilarTo]->x-[:SimilarTo]->y-[:SimilarTo]->z-[:SimilarTo]->sim

    will give you imo 210292 209410 210292 209410 xxxxx

    i suggest to be 100% sure you get the same nodes under the identifiers, either divide the query into 2 separate parts (as suggested in the comments with WITH) or strictly define you don’t want any cycle in the query:

    MATCH artist-[:SimilarTo]->x-[:SimilarTo]->sim
    WHERE artist.artistName! = 'Shining Fury' 
    AND Id(artist)<>Id(sim)
    

    in case you must go through the loops, then do the dividing into 2 parts query solution

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am using JSon response to parse title,date content and thumbnail images and place
I am trying to render a haml file in a javascript response like so:
I am using the SimpleRSS gem to parse a WordPress RSS feed. The only

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.