An IN_REPLY_TO relationship connects a tweet to the tweet it answers, representing response structure in a Twitter graph. It keeps replies distinct from retweets and quote tweets, whose different semantics support different analyses. section 3.2.2
Model and import the relationship as follows:
- Create a directed relationship from the source tweet to the target tweet being answered. section 3.2.5
- Store reply pairs in a CSV file with source and target tweet identifiers. section 3.2.5
- Use MERGE during import so repeated rows do not create duplicate relationships. section 3.2.5
Import reply relationships with Cypher
LOAD CSV WITH HEADERS FROM "reply-data.csv" AS row MATCH (source:Tweet {id:row.source}) MATCH (target:Tweet {id:row.target}) MERGE (source)-[:IN_REPLY_TO]->(target); section 3.2.5
A relationship diagram helps compare IN_REPLY_TO with RETWEETS and quote-tweet relationships. section 3.2.2
