cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Create a nested ratings/comments feature like reddit

hi,

We have rating/comments functionality with below structure..

(User)-[r:ratings{comments info}]->(Object)..

Now we are looking to allow user to reply/comments of these ..like a nested conversation..

Looking for inputs on modeling this using nested relationships, paths and depths..but again i don't to create a flood of nodes for ratings/comments..

Thanks in advance.

3 REPLIES 3

rushikesh
Node Clone

Hey @sivakura, why don't you create node for the rating object. Like,
(User)<-[:From]-(Rating {comments : info})-[:To]->(Object).
And for conversation create a new relation of reply which store the time stamp of the reply time, so you can sort conversation according to the time sort. Like,
(User)-[:Reply {timestamp}]->(Rating)

Thanks Rushikesh. But replies can have replies and on ..

rushikesh
Node Clone

In that case, create a relation between user and user node