I have a Cypher query that returns a TagSynonym
node between two Tag
nodes:
MATCH (t:Tag)<-[:FOR]-(ts:TagSynonym)-[:HAS]->(s:Tag)
WHERE t.id = {tagId} AND s.id = {synonymId}
RETURN ts
Additionally, the s:Tag
node itself can have its own TagSynonym
nodes like:
(s)<-[:FOR]-(ts:TagSynonym)-[:HAS]->(ss:Tag)
and ss
can have its own TagSynonym
and so on and so forth.
The depth of this structure can be pretty big.
Please help me to extend this query in order to return all TagSynonym
established on t:Tag
and all of its synonym successors(tags for s:Tag
and deeper up to the end of this recursive structure.)