简体   繁体   中英

Relationship decay in Neo4j

I'm evaluating neo4j for a project. 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? 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;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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