Hi everyone,
I have the following query:
MATCH (parent:CI)<-[r:HAS_PARENT]-+(child:CI)
WITH DISTINCT(r), parent, child
WHERE ((apoc.bitwise.op(parent.consumerTag,">>",1) % 2 = 1 AND parent.consumerTag % 2 = 1) OR ( (apoc.bitwise.op(parent.consumerTag,">>",9) % 2 = 1))) AND (((apoc.bitwise.op(child.consumerTag,">>",1) % 2 = 1 AND child.consumerTag % 2 = 1) OR ( (apoc.bitwise.op(child.consumerTag,">>",9) % 2 = 1))))
MERGE (parent)<-[:HAS_PARENT_CUS]-(child)
which is basically trying to introduce a new relationship between the tagged parent and child while skipping the ones that are not tagged (in the path). This query produces this resultset for the following cases:
The question relies on how to make the query behave as unique for those paths that already traverses and then produce some result as the following image:
Would something like this be even feasible without having some programming layer at all or not really?