I am using a Neo4j DB. I want a query to retrieve the data that has been updated recently. Say for example I have the data at a certain time (say 4 o'clock). How do I check the data entered after a certain interval of time (say 4 hours)?
Asked
Active
Viewed 148 times
2 Answers
2
I think you will have to create one more field say createdOn where you will maintain the timestamp for insertion.
And you can find the record using where clause in cypher query.

dev
- 715
- 5
- 21
-
thank you, but how am i supposed to find it without the time stamp? – Kanak Nov 19 '13 at 06:48
-
You can't, like the answer says you have to maintain the timestamps yourself in the graph. See this question for how to model this with legacy indexing http://stackoverflow.com/questions/9138857/in-neo4j-how-can-i-index-by-date-and-search-in-a-date-range/9147388#9147388 – jjaderberg Nov 19 '13 at 13:01
0
you can use node.js and socket.io to push the data at the certain time. also you can add an updatedAt field to your graph nodes. So at a certain time you can traverse through nodes and broadcast the data to your clients.

Zafer Fatih Koyuncu
- 325
- 3
- 10