简体   繁体   English

Neo4j 中的关系衰减

[英]Relationship decay in Neo4j

I'm evaluating neo4j for a project.我正在为一个项目评估 neo4j。 Overall it seem to fit my needs fairly well but I have one requirement that I'm not sure about.总的来说,它似乎非常适合我的需求,但我有一个我不确定的要求。

I need to be able to create a relationship between two nodes that decays over time.我需要能够在两个节点之间创建随时间衰减的关系。

Does neo4j support such a thing? neo4j 支持这样的东西吗? Or does anyone know of a crafty way of doing this?或者有人知道这样做的狡猾方法吗?

To get the "freshest" relationships first, you could just sort the relationships in descending order by their stored timestamps.要首先获得“最新鲜”的关系,您可以按其存储的时间戳按降序对关系进行排序。

For example:例如:

MATCH (f:Foo {id: 123})-[b:BAR]->()
RETURN b
ORDER BY b.stored_timestamp DESC;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM