AFAIK it's a quirk of the Neo4j browser on what it displays in different output modes. Not everything in the result set is included when the results are viewed in text mode. All the data is there and you will see the full result set in table mode. Using the Movies database as an example, this query run in the Neo4j Browser:
match path=(:Person)-[:ACTED_IN]->(:Movie) RETURN path LIMIT 1
Returns this in text mode (note that no :Person
or :Movie
labels or :ACTED_IN
relationship or direction are shown):
+----------------------------------------------------------------------------------------------------------------------------------+
|"path" |
+----------------------------------------------------------------------------------------------------------------------------------+
|[{"name":"Keanu Reeves","born":1964},{"roles":["Neo"]},{"tagline":"Free your mind","title":"The Matrix Reloaded","released":2003}]|
+----------------------------------------------------------------------------------------------------------------------------------+
All the data is there when viewed in table mode (note the label and relationship data):
{
"start": {
"identity": 0,
"labels": [
"Person",
"Famous",
"Rich"
],
"properties": {
"name": "Keanu Reeves",
"born": 1964
}
},
"end": {
"identity": 8,
"labels": [
"Movie"
],
"properties": {
"tagline": "Free your mind",
"title": "The Matrix Reloaded",
"released": 2003
}
},
"segments": [
{
"start": {
"identity": 0,
"labels": [
"Person",
"Famous",
"Rich"
],
"properties": {
"name": "Keanu Reeves",
"born": 1964
}
},
"relationship": {
"identity": 263,
"start": 0,
"end": 8,
"type": "ACTED_IN",
"properties": {
"roles": [
"Neo"
]
}
},
"end": {
"identity": 8,
"labels": [
"Movie"
],
"properties": {
"tagline": "Free your mind",
"title": "The Matrix Reloaded",
"released": 2003
}
}
}
],
"length": 1.0
}
cypher-shell takes a more literal approach on what it outputs:
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| path |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| (:Person:Famous:Rich {name: "Keanu Reeves", born: 1964})-[:ACTED_IN {roles: ["Neo"]}]->(:Movie {tagline: "Free your mind", title: "The Matrix Reloaded", released: 2003}) |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
The Neo4j Browser does a lot of nice things to aid in visualization and development, but sometimes it's useful to fall back to cypher-shell.