当前位置:网站首页>Neo4j realizes social recommendation (V)
Neo4j realizes social recommendation (V)
2022-06-09 09:29:00 【Great for the rest of my life】
Catalog
- Understanding graph database neo4j( One )
- Understanding graph database neo4j( Two )
- Understanding graph database neo4j( 3、 ... and )
- neo4j Make social recommendations ( Four )
Preface
In the fourth part, the basic social character tags and friend relationship information are established , In this article, we will first add the friends of each character , Enrich our knowledge map and better see the display effect of data 、 Then view common concerns through query statements 、 People you may know 、 Several of my friends have also paid attention to his functions
Realization
Create nodes
Wang Wei's friend : Zhang Jiuling 、 Liguanian 、 meng haoran 、 CEN Shen 、 Yuan Chang 、 Zen master Shenhui 、 Chao Heng
Li Bai already has a friend of Wang Wei among his friends : meng haoran
Create remaining friends : Zhang Jiuling 、 Liguanian 、 CEN Shen 、 Yuan Chang 、 Zen master Shenhui 、 Chao Heng
create (n:SocialUser {
name:' Zhang Jiuling '}) return n;
create (n:SocialUser {
name:' Liguanian '}) return n;
create (n:SocialUser {
name:' CEN Shen '}) return n;
create (n:SocialUser {
name:' Yuan Chang '}) return n;
create (n:SocialUser {
name:' Zen master Shenhui '}) return n;
create (n:SocialUser {
name:' Chao Heng '}) return n;
The above are all Li Bai's friends , So we don't need to filter the pointing relationship , Point directly to the label
match (a:SocialUser {
name:' Wang wei '}),(b:SocialUser)
where b.name in [' Zhang Jiuling ',' Liguanian ',' meng haoran ',' CEN Shen ',' Yuan Chang ',' Zen master Shenhui ',' Chao Heng ']
merge (a)-[:FRIEND]->(b)
return a,b
View results 
边栏推荐
- WebRTC系列--计算帧率及帧间隔
- 了解图数据库neo4j(一)
- Will testing not be replaced by development?
- C language pointer
- English grammar_ adverb
- 【代码注释】doxygen
- 2022-2028 global UAV detection and jamming system industry survey and trend analysis report
- Residual current relay uses residual current transformer to detect residual current and prevent electrical fire
- 如何看待 Dapr、Layotto 這種多運行時架構?
- MySQL基础 数据类型精讲
猜你喜欢
![[matlab] [digital simulation] [1] linprog solving linear programming, standard type](/img/e2/584ff7809bcad613b157a6a17d53db.png)
[matlab] [digital simulation] [1] linprog solving linear programming, standard type

How to draw a picture gracefully
![[code comment] Doxygen](/img/db/0017e30ef8ff5d9d71a9d02a7ed7cf.png)
[code comment] Doxygen

附十七章 网络程序解读限定文章

如何看待 Dapr、Layotto 這種多運行時架構?

MySQL基础 函数篇
![[antenna] [2] explanation of some nouns and simple concepts, still](/img/84/7fb2b01dc717eb9196b33066ea3b4e.png)
[antenna] [2] explanation of some nouns and simple concepts, still

MySQL basic multi table query

附十七章 網絡程序解讀限定文章

Anatomy of illusory rendering system (15) - XR topic
随机推荐
redhat7 破解(重置)root密码
MySQL基础 数据类型精讲
C指针复习
Precautions for Tencent cloud pagoda website construction
论文理解【RL - Exp Replay】—— An Equivalence between Loss Functions and Non-Uniform Sampling in Exp Replay
ESP32学习笔记【WiFi网络篇】-01AP&STA
使用Canvas画出多个多边形Polygon
How to use alicloud CDN to cache static websites deployed on function computing
[antenna] [1] explanation of some nouns and simple concepts
How do you view the multi runtime architecture of dapr and layotto?
Esp32 learning notes [WiFi network] - 01ap & sta
Creation of menu for wechat applet development
How do you view the multi runtime architecture of dapr and layotto?
Opencv get image pixel value data type
AtCoder Beginner Contest 252
MySQL basic query statement
2022-2028 global UAV detection and jamming system industry survey and trend analysis report
Attachment 17: limited articles on network program interpretation
Acwing game 54
50% cost savings, 9-person team develops WOLAI online document application using function calculation