【发布时间】:2017-10-22 09:32:55
【问题描述】:
我建立了一个社交网络,当评论包括提及(如 Facebook)时,我将评论 json 发送到 web 服务:
{
"owner": 5, // id of user write comment
"message": "text",
"mentions":[
{
"id": 1, // user id
"name": "mention", // name is shown
"offset": 0, // position of start of mention text
"length": 10 // length of mention text
},
{
"id": 2, // user id
"name": "mention", // name is shown
"offset": 0, // position of start of mention text
"length": 10 // length of mention text
}
],
}
数据模型: (User)-[WRITE]->(Comment{message})-[MENTION{name,offset,length}]->(User)
在源代码中,我使用下面的代码返回带有注释 ID 的 res
cq := neoism.CypherQuery{
Statement: stmt,
Parameters: params,
Result: &res,
}
我的问题是我不知道如何为此编写查询。对我来说太难了。
【问题讨论】:
标签: neo4j cypher mention neoism