neo4j-graphacademy / app-nodejs Goto Github PK
View Code? Open in Web Editor NEWhttps://graphacademy.neo4j.com/courses/app-nodejs
https://graphacademy.neo4j.com/courses/app-nodejs
In: cypher/2-interacting/4-home-page/highest-rated-movie.cypher
Need to change:
MATCH (m:Movie)
WHERE exists(m.imdbRating)
RETURN m.title
ORDER BY m.imdbRating DESC LIMIT 1
to:
MATCH (m:Movie)
WHERE m.imdbRating IS NOT NULL
RETURN m.title
ORDER BY m.imdbRating DESC LIMIT 1
In: cypher/3-backlog/1-browse-genres/genre-details.cypher
Need to change:
MATCH (g:Genre)
CALL {
WITH g
MATCH (g)<-[:IN_GENRE]-(m:Movie)
WHERE exists(m.imdbRating) AND exists(m.poster) AND g.name <> '(no genres listed)'
RETURN m.poster AS poster
ORDER BY m.imdbRating DESC LIMIT 1
}
RETURN g {
.*,
poster: poster
}
ORDER BY g.name ASC
to:
MATCH (g:Genre)
CALL {
WITH g
MATCH (g)<-[:IN_GENRE]-(m:Movie)
WHERE m.imdbRating IS NOT NULL AND m.poster IS NOT NULL AND g.name <> '(no genres listed)'
RETURN m.poster AS poster
ORDER BY m.imdbRating DESC LIMIT 1
}
RETURN g {
.*,
poster: poster
}
ORDER BY g.name ASC
In: cypher/3-backlog/2-find-genre-details/genre-details.cypher
Change:
MATCH (g:Genre {name: $name})<-[:IN_GENRE]-(m:Movie)
WHERE exists(m.imdbRating) AND exists(m.poster) AND g.name <> '(no genres listed)'
WITH g, m
ORDER BY m.imdbRating DESC
WITH g, head(collect(m)) AS movie
RETURN g {
link: '/genres/'+ g.name,
.name,
movies: size((g)<-[:IN_GENRE]-()),
poster: movie.poster
} AS genre
to:
MATCH (g:Genre {name: $name})<-[:IN_GENRE]-(m:Movie)
WHERE m.imdbRating IS NOT NULL AND m.poster IS NOT NULL AND g.name <> '(no genres listed)'
WITH g, m
ORDER BY m.imdbRating DESC
WITH g, head(collect(m)) AS movie
In: cypher/3-backlog/4-movie-view/similar-movies.cypher
Change:
MATCH (:Movie {tmdbId: $id})-[:IN_GENRE|ACTED_IN|DIRECTED]->()<-[:IN_GENRE|ACTED_IN|DIRECTED]-(m)
WHERE exists(m.imdbRating)
WITH m, count(*) AS inCommon
WITH m, inCommon, m.imdbRating * inCommon AS score
ORDER BY score DESC
SKIP $skip
LIMIT $limit
RETURN m {
.*,
score: score,
favorite: m.tmdbId IN $favorites
} AS movie
to:
MATCH (:Movie {tmdbId: $id})-[:IN_GENRE|ACTED_IN|DIRECTED]->()<-[:IN_GENRE|ACTED_IN|DIRECTED]-(m)
WHERE m.imdbRating IS NOT NULL
WITH m, count(*) AS inCommon
WITH m, inCommon, m.imdbRating * inCommon AS score
ORDER BY score DESC
SKIP $skip
LIMIT $limit
RETURN m {
.*,
score: score,
favorite: m.tmdbId IN $favorites
} AS movie
In: cypher/3-backlog/4-movie-view/similar-to-pulp-fiction.cypher
Change:
MATCH (:Movie {tmdbId: '100'})-[:IN_GENRE|ACTED_IN|DIRECTED]->()<-[:IN_GENRE|ACTED_IN|DIRECTED]-(m)
WHERE exists(m.imdbRating)
WITH m, count(*) AS inCommon
WITH m, inCommon, m.imdbRating * inCommon AS score
RETURN m.title
ORDER BY score DESC
LIMIT 1
To:
MATCH (:Movie {tmdbId: '100'})-[:IN_GENRE|ACTED_IN|DIRECTED]->()<-[:IN_GENRE|ACTED_IN|DIRECTED]-(m)
WHERE m.imdbRating IS NOT NULL
WITH m, count(*) AS inCommon
WITH m, inCommon, m.imdbRating * inCommon AS score
RETURN m.title
ORDER BY score DESC
LIMIT 1
The repository still contains code samples using size(), which is deprecated.
The tutorial has already been updated to use count {}.
I want to know if you plan to migrate this project to typescript.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.