The complette query I'm trying to have well ordered with 100 posts (and at
most 5*100 photos) would be something like this:
MATCH (market:Market)-[:post_market]-(post:Post) WHERE ID(market)=123
OPTIONAL MATCH post-[:post_author]-author
OPTIONAL MATCH post-[:posted_photos]-photo
OPTIONAL MATCH photo-[:sizes]-(size220{x:220,method:4})
OPTIONAL MATCH photo-[:sizes]-(size52{x:52,method:3})
OPTIONAL MATCH photo-[:album_photos]-album
OPTIONAL MATCH photo-[:tour_photos]-tour
OPTIONAL MATCH photo-[:comments]-comment
WITH post, author, photo, size220, size52, album, tour, comment
ORDER BY photo.created_at DESC, comment.created_at DESC
RETURN post, author, collect(photo)[0..5], size220, size52, album, tour,
collect(comment)[0..2]
ORDER BY post.updated_at DESC
LIMIT 100;
--
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.