Search code examples
neo4jcypher

Pipe Symbol Showing up as an invalid Input in Neo4j Browser


I am currently doing the course on graph analytics for big data offered by the university of California San Diego. Therein, some code was provided to find all the shortest paths between two given nodes. All the nodes, relationships, labels, other definitions have been done properly. However, I still get the following: Problem image 1 and: Problem image 2

I followed the codes as per the instructions. All the code snippets that did not have the pipe symbol worked as expected. However, as soon as the pipe symbol was used, I was getting this error. The pipe symbol has not been deprecated and is still a major operator for performing crucial functions.

Any help would be greatly appreciated. Thanks in advance.


Solution

  • Cypher has no EXTRACT function.

    I think using a list comprehension instead would work for your RETURN clause (and the syntax does not support a superfluous colon after the '|'):

    RETURN [n IN NODES(p) | n.Name] AS Paths