Saturday, 15 May 2010

Neo4j linked list - multiple nodes -


I am working on understanding how to improve performance and use linked lists to create activity feeds on Neo4j I'm still working on learning cipher, so I have a question. I have found an example of some linked lists, but I need a large number of lists so that in the end all the pieces together in my head

I used it The code is found to be more useful than the example of Neo 4G manual. Still I'm a bit confused ... Does anyone modify it so that seven nodes can speak seven items in the link list, and then insert a node in front of it?

Yes, I am trying to add the latest status update at the top of the linked list. This example does not really do this, but it is closed .. Then looking for some models .. No, I'm not really coding yet, Still trying to master Cypher for the first time - For the next two weeks, it will continue to study. There is Ruby on the Railways side work. Just need to understand the linked lists used with the SIEF / Neo.


  create zero = {name: 0, value: 0}, two = {value: 2, name: 2}, zero - [: LINK] -> Two - [: LINK] - & gt; Zero ==== Zero ==== MATCH Zero - [: LINK * 0] - & gt; Before, after - [: LINK * 0 ..] - & gt; Zero, first- [old: LINK] - & gt; Before that WHERE.value? & Lt; = 1 and 1 & lt; = After.value? Dellie Old ==== Zero ==== MATCH P = Zero-New = Create = {Name: 1, Value: 1}, First - [: LINK] - & gt; New Value, New Valley - [: LINK] - & gt; [: Link * 1 ..] - & gt; List_length as zero return length (P)   

Whatever I'm trying to do in my mind, it understands first and zero data sets - I approx. is it, but to see that it has been done with more than two early nodes on one set so that to clear any confusion,

thanks!

The front node is special because there are no link links in it, usually you are concerned with the head node , So it's about taking this node on the head node and removing the head node one step further. Something like this:

  user = node: connect to node_auto_index (user = "me") user [old: MESSAGES] - & gt; Make head old - new_heads = {title: "title", date: 2348972389, text: "text"}, user - [: MESSAGES] - & gt; New_head - [: LINK] - & gt; Head    

No comments:

Post a Comment