Replies: 2 comments 5 replies
-
I found that you can create maps with map{key: value, ...} and the following query works:
So in that regard we're pretty close to a good solution however(!) when removing the LIMIT to get the complete result set there is a problem with silently disappearing query. I removed the LIMIT and I expect to get ~86000 rows but:
Why does this happen? Why is there no exceptions, feedback or even logs on server side? |
Beta Was this translation helpful? Give feedback.
-
You could use MATCH (p:player) \
WITH \
p.player.age as age, \
collect([p.player.name, p.player.age]) as members, \
size(collect(p.player.name)) as age_size \
RETURN age, age_size, members LIMIT 3; (root@nebula) [basketballplayer]> MATCH (p:player) \
-> WITH \
-> p.player.age as age, \
-> collect([p.player.name, p.player.age]) as members, \
-> size(collect(p.player.name)) as age_size \
-> RETURN age, age_size, members LIMIT 3;
+-----+----------+--------------------------------------------------------------------------------------------------+
| age | age_size | members |
+-----+----------+--------------------------------------------------------------------------------------------------+
| 41 | 1 | [["Manu Ginobili", 41]] |
| 20 | 1 | [["Luka Doncic", 20]] |
| 30 | 4 | [["DeAndre Jordan", 30], ["Russell Westbrook", 30], ["Kevin Durant", 30], ["Blake Griffin", 30]] |
+-----+----------+--------------------------------------------------------------------------------------------------+ About when the limit was removed, the result disappears, did you see any error about timeout? I suspect we need About |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am struggling find if it is possible to make a query to collect a list of lists with some of the properties of a node. To start from the beginning I have this
Tag: Player
Properties for tag:
name string
team int
goals int
contractStart int
contractEnd int
I want to query them and group them per team like this:
with the tricky part being that the members column should be a list of [, , , ] for each member.
Example output:
My attempts so far involve:
(works but has only Player.name for each player in members column)
I tried to get all properties for p instead of just name by changing out
collect(p.Player.name) as members
to
collect(properties(p)) as members
but this query never finishes (maybe it runs out of memory?) and it would list team property redundantly which is not preferred. The machine I am testing on has 16g memory and ubuntu+nebula is all that is running on it.
How can this query be constructed so
Beta Was this translation helpful? Give feedback.
All reactions