If you only get started with Neo4j update to 2.0.2 and use labels.

This query will still be expensive as it is a global graph query.

Then your query looks like this:

First find the movies, not viewed by the customer, then for those movies
aggregate views.

I created a graphgist for it here:
http://gist.neo4j.org/?dropbox-14493611%2Fmovie_recommendation.adoc



On Sun, Apr 27, 2014 at 6:20 AM, Arun Kumar <[email protected]> wrote:

> My Cypher query is performing really slow even with very less volume
> (hundreds of records)..
>
> start n=node(*),n1=node:node_auto_index(customerId = '23')
> MATCH (n)-->(movie) where movie.Language = 'English' and
> movie.MOVIE_STATUS='A'
> with distinct(movie) as mov,n1 where not(n1-->mov)
> with distinct(mov) as movDet, count(mov) as movCt return
> movCt,movDet.Movie,movDet.Language order by movCt desc
>
> All I am trying to do is to find out the most liked movies which the
> customer hasn't visited previously (in the same language)..
>
> Any suggestion would be of great help..
>
> Thanks,
> Arun.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to