Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MATCH (u:User {uid: $userId})
- WITH u UNWIND $statements as statement
- WITH u, statement
- UNWIND statement.conceptsRelations as conceptsRelation
- MATCH (c_from:Concept{name: conceptsRelation.from})
- MATCH (c_to:Concept{name: conceptsRelation.to})
- CREATE (c_from)-[:TO {context:conceptsRelation.context,statement:conceptsRelation.statement,user:u.uid,timestamp:conceptsRelation.timestamp, uid:apoc.create.uuid(), gapscan:conceptsRelation.gapscan, weight: conceptsRelation.weight}]->(c_to)
- WITH u, statement
- UNWIND statement.mentionsRelations as mentionsRelation
- MATCH (m_from:Concept{name: mentionsRelation.from})
- MATCH (m_to:Concept{name: mentionsRelation.to}) return m_from, m_to
- MATCH (u:User {uid: $userId})
- WITH u UNWIND $statements as statement
- WITH u, statement
- UNWIND statement.mentionsRelations as mentionsRelation
- MATCH (m_from:Concept{name: mentionsRelation.from})
- MATCH (m_to:Concept{name: mentionsRelation.to}) return m_from, m_to
Add Comment
Please, Sign In to add comment