Database Reference
In-Depth Information
Listing 11-45. getFollowingContentWithTag in the MappedContentRepository
@Query("MATCH (u:User {username: {u} }) " +
" WITH u " +
" MATCH (u)-[:FOLLOWS]->f " +
" WITH DISTINCT f " +
" MATCH f-[:CURRENTPOST]-lp-[:NEXTPOST*0..]-p " +
" WITH DISTINCT f,p " +
" MATCH p-[:HAS]-(t:Tag {wordPhrase : {wp} } ) " +
" RETURN p.contentId as contentId, p.title as title, p.tagstr as tagstr, " +
" p.timestamp as timestamp, p.url as url, f.username as username, false as owner" +
" ORDER BY p.timestamp DESC")
List<MappedContent> getFollowingContentWithTag (@Param("u") String username, @Param("wp") String
wordPhrase);
Figure 11-13. Filtering content of the current user's friends
 
Search WWH ::




Custom Search