1

If I run this code

CALL pagerank.get()
YIELD node, rank;

everything works like a charm. But If I expand the query just a little with sorting it gets stuck.

CALL pagerank.get()
YIELD node, rank
ORDER BY rank DESC;

I don't get any results or errors. What could be the reason for this? Should I add something to my code?

Taja Jan
  • 942
  • 1
  • 1
  • 11

1 Answers1

2

Whenever you have a CALL procedure which yields something, you must have a RETURN clause. Hence, the correct usage would be:

CALL pagerank.get()
YIELD node, rank
RETURN node, rank;

Similarly, when trying to sort the results by some value, first add the RETURN clause:

CALL pagerank.get()
YIELD node, rank
RETURN node, rank
ORDER BY rank DESC;
KateLatte
  • 611
  • 1
  • 12