I have a path that has two hops and each hop is a different vertex type. This is the path:
-
User (vertex)
-
User2EvaluationEvent (edge)
-
EvaluationEvent (vertex)
-
EvaluationEvent2ConceptItem (edge)
-
ConceptItem (vertex)
I want to return all the “ConceptItems” for a “User” and everything in-between.
This query returns only “ConceptItem” vertexes as expected:
And when I also PRINT the ListAccum of Event2Item edges I get this result.
Interesting…. it pulled in the green “EvaluationEvent” vertexes even though I didn’t explicitly request them.
Now I want to pull in the User vertex and the edges connecting the User to the “User2EvaluationEvent” edges. I’m guessing I need to pull in another ListAccum of “User2EvaluationEvent” edges. Right?
OK, here is my query which has an error.
And the error is:
“Error: mismatched input ‘accum’ expecting {HAVING, INTERSECT, LIMIT, MINUS, ORDER, POST_ACCUM, UNION, ‘%’, ‘&’, ‘+’, ‘-’, ‘*’, ‘/’, ‘.’, ‘,’, ‘;’, ‘>’, ‘|’, ‘<<’}”
What do I need to do to return everything between “User” and all “ConceptItem” vertexes and everything in-between? Below is the text for the query.
CREATE QUERY GetUserEventsItems(vertex<User> inputUser) FOR GRAPH MyGraph syntax v2 {
ListAccum<edge>@@edgeEvent2Items;
ListAccum<edge>@@edgeListUserEvents;
Start = {inputUser};
Items = SELECT tItm FROM Start:s-(User2EvaluationEvent>:eUserEvent)-EvaluationEvent:tEvent-(EvaluationEvent2ConceptItem>:eEvItm)-ConceptItem:tItm
ACCUM @@edgeEvent2Items += eEvItm
ACCUM @@edgeListUserEvents += eUserEvent;
Print inputUser;
Print Items;
Print @@edgeEvent2Items;
}
Thank you.