Tag Archives: movies

Caching Partial Traversals in Neo4j

cache_all_the_things

Sometimes you’ll find yourself looking at a traversal and thinking… “I’m going to be doing this one thing over and over again.” That sounds kind of wasteful and years of recycling have taught us not to be wasteful. Let’s take a look at an example from our past. Look back at the Neo Love application, the one with the picture of Marilyn Monroe and Groucho Marx. Let’s see what a Neo4j 2.0 version of that query would look like:

Continue reading

Tagged , , , , , , , ,

Personalization with Cypher

You hopefully have seen a TV commercial from “The Man Your Man Could Smell Like” marketing campaign put on by Old Spice, and you may have seen some of the over 100 videos Isaiah Mustafa appeared in responding to comments made on Twitter. This is a great example of personalization, and today you’ll learn how you can bring some personalization to your application, and you won’t need muscles or a horse.

We’re going to dust off the Neoflix project from the beginning of the year and add a few features. It has been updated to work on Neo4j version 1.7 and allows searching for movies that have a quote. Thanks to Jenn Alons and Vince Cima for the bug fixes during WindyCityDB.
Continue reading

Tagged , , ,

Neo4j on Heroku – Part Two

We are picking up where we left off on Neo4j on Heroku –Part One so make sure you’ve read it or you’ll be a little lost. So far, we have cloned the Neoflix project, set up our Heroku application and added the Neo4j add-on to our application. We are now ready to populate our graph.

UPDATE: Learn a better way to create the graph in part 3 of my Neo4j on Heroku series.

Bring up two browser windows. On one you’ll go to your Neo4j instance running on Heroku,

$ heroku config
NEO4J_URL      => http://xxxxxxxx:yyyyyyyy@70825a524.hosted.neo4j.org:7014

and on the other you’ll go to the create_graph route of your app. So if you named your app neoflix, you’d go to neoflix dot herokuapp dot com/create_graph.

This will run the create_graph method and you’ll see nodes and relationships being created on the Neo4j Dashboard. It’s just over a million relationships, so it will take a few minutes. There are faster ways to load data into Neo4j (wait for part three of this series), but this will work in our case.
Continue reading

Tagged ,