Database Reference
In-Depth Information
" WHERE before is not null AND after is not null " +
" CREATE UNIQUE (before)-[:NEXTPOST]->(after) " +
" WITH count(before) as cnt " +
" MATCH (c:Content { contentId: {2} })-[r]-() " +
" DELETE c, r",
map("1", username, "2", contentId));
}
Interest Graph Model
This section looks at the interest graph and examines some basic ways it can used to explicitly define a degree of
interest. The following topics are covered:
•
Adding filters for owned content
•
Adding filters for connected content
•
Analyzing connected content (count tags)
Interest in Aggregate
Inside the
interest
method of the
InterestAction
class, you will retrieve all of the tags connected to a user and their
friends the
tagsInMyNetwork
method found in the
TagDAO
class. This is displayed Figure
12-12
in the left-hand column
on the page.
Figure 12-12.
Filtering the current user's content
The markup is located in
{PROJECTROOT}
/
WebContent/mustache/html/graphs/interest/index.html.
The
tagsInMyNetwork
method uses two queries, which are shown in Listing 12-34. The
tagsInNetwork
finds users being
followed, accesses all of their content, and finds connected tags using the
HAS
relationship type.