Hi,
Let’s say i have nodes A->B->C and i want to select B nodes with no a_b and b_c edges
I do this:
{
var(func: has(B)) {
id as uid
cnta as count(~a_b)
cntc as count(b_c)
}
q(func: uid(id)) @filter(eq(val(cnta),0) and eq(val(cntc),0)) {
uid
}
}
The query takes for about 11s when set of B is 87000 nodes(too long)
The same query in neo4j (match(b:B) where not (b)--() return b ) takes for about 500ms only
Your query gives wrong result. I want to get those of B nodes which do not have edges with A and C. My query gives right result but takes too long time.