Description
I am using the Neo4jGraph with the following SubgraphStrategy:
SubgraphStrategy.build().vertexCriterion(has("isLatest", true)).create();
I have 2 traversals. This one working works:
Map<String, Long> languageCounts = searchResult.as("a").inE("isCreatedBy").outV().outE("hasWorkLanguage").inV().as("b").dedup("a", "b") .has("wwlanguage_name").<String>groupCount() .by("wwlanguage_name").next();
This translates to:
[Neo4jGraphStep([],vertex)@[a], TraversalFilterStep([HasStep([isLatest.eq(true)])]), VertexStep(IN,[isCreatedBy],edge), TraversalFilterStep([AndStep([[EdgeVertexStep(IN), TraversalFilterStep([HasStep([isLatest.eq(true)])]), TraversalFilterStep([HasStep([isLatest.eq(true)])])], [EdgeVertexStep(OUT), TraversalFilterStep([HasStep([isLatest.eq(true)])]), TraversalFilterStep([HasStep([isLatest.eq(true)])])]])]), EdgeVertexStep(OUT), TraversalFilterStep([HasStep([isLatest.eq(true)])]), VertexStep(OUT,[hasWorkLanguage],edge), TraversalFilterStep([AndStep([[EdgeVertexStep(IN), TraversalFilterStep([HasStep([isLatest.eq(true)])]), TraversalFilterStep([HasStep([isLatest.eq(true)])])], [EdgeVertexStep(OUT), TraversalFilterStep([HasStep([isLatest.eq(true)])]), TraversalFilterStep([HasStep([isLatest.eq(true)])])]])]), EdgeVertexStep(IN)@[b], TraversalFilterStep([HasStep([isLatest.eq(true)])]), TraversalFilterStep([PropertiesStep([wwlanguage_name],property)]), DedupGlobalStep([a, b]), GroupCountStep(value(wwlanguage_name))]
This one fails:
Map<String, Long> languageCounts = searchResult.as("a").in("isCreatedBy").out("hasWorkLanguage").as("b") .dedup("a", "b").has("wwlanguage_name") .<String>groupCount().by("wwlanguage_name").next();
This translates to:
[Neo4jGraphStep([],vertex)@[a], TraversalFilterStep([HasStep([isLatest.eq(true)])]), VertexStep(IN,[isCreatedBy],edge), TraversalFilterStep([AndStep([[EdgeVertexStep(IN), TraversalFilterStep([HasStep([isLatest.eq(true)])]), TraversalFilterStep([HasStep([isLatest.eq(true)])])], [EdgeVertexStep(OUT), TraversalFilterStep([HasStep([isLatest.eq(true)])]), TraversalFilterStep([HasStep([isLatest.eq(true)])])]])]), EdgeVertexStep(OUT), TraversalFilterStep([HasStep([isLatest.eq(true)])]), VertexStep(OUT,[hasWorkLanguage],edge), TraversalFilterStep([AndStep([[EdgeVertexStep(IN), TraversalFilterStep([HasStep([isLatest.eq(true)])]), TraversalFilterStep([HasStep([isLatest.eq(true)])])], [EdgeVertexStep(OUT), TraversalFilterStep([HasStep([isLatest.eq(true)])]), TraversalFilterStep([HasStep([isLatest.eq(true)])])]])]), EdgeVertexStep(IN), TraversalFilterStep([HasStep([isLatest.eq(true)])]), TraversalFilterStep([PropertiesStep([wwlanguage_name],property)]), DedupGlobalStep([a, b]), GroupCountStep(value(wwlanguage_name))]
The failing query misses the '@[b]' of the last EdgeVertexStep(IN).
Attachments
Issue Links
- links to