Showing posts with label neo4j. Show all posts
Showing posts with label neo4j. Show all posts

Saturday, April 22, 2017

How to create a linked list in neo4j?

Having a "Post" nodes that have "FILED_IN" relations to "Topic" model. We can retrieve all posts filed under the Topic using;

MATCH (p:Post)-[FILED_IN]->(t:Topic) return p

But what if we need to retrieve next post. It will be convenient to have a relation to the next post. We can add this relation anytime using the following Cypher.

MATCH (p:post)-[FILED_IN]->(t:Topic)
WITH p
ORDER BY p.timestamp
WITH COLLECT(p) AS posts
UNWIND RANGE(0,LENGTH(posts) - 2) as idx 
WITH posts[idx] AS p1, posts[idx+1] AS p2
MERGE (p1)-[:NEXT]->(p2)
 

 
  

Neo4j + AWS Lambda & API Gateway to Create a Recommendation Engine



The Challenge of Findability and Why Graphs? Here at the SAVO Group, we are in the business of sales enablement via Software as a Service (SaaS). One of the tools that we provide our customers is the ability to prescribe content proactively for their sales people or sellers.

from Pocket http://ift.tt/2fv5lNg
via IFTTT

Friday, April 21, 2017

Finding the Shortest Path through the Park (with Graphs!)



As you may know by now, I like beer. A lot. Why else would I keep writing and talking about it? But there’s more to life than sweet beverages, and one of the things that I have been doing for as long as I can remember is orienteering.

from Pocket http://ift.tt/2lf6Rot
via IFTTT

bundlephobia

JavaScript bloat is a more real problem today than it ever was. Bundlephobia lets you understand the performance cost of adding a npm pack...