I am using Neo4j 2.0 version. Suppose, I have lot of records which have date as one of their fields and if we need to support lot of queries like count of records between two specific dates etc, I think that I may have tpo index all the records by Date field. Is this correct? Then., how do I do it. All nodes of the type "RECORD" need to be indexed dy date. How can I achieve this? Please note that Date is a not unique field. And how do I even store Date property in the records. Is Date supported in CYPHER or Neo4j. How do I sort the records by Date field?
Integer, Float, String, Boolean, Point, Date, Time, LocalTime, DateTime, LocalDateTime, and Duration.
The World's Leading Organizations Rely on Neo4j. With more than 950 enterprise customers, Neo4j is the world's leading provider of scalable graph technology, enabling connected data applications for more than 75% of the Fortune 100.
Additionally, Neo4j has scalability weaknesses related to scaling writes, hence if your application is expected to have very large write throughputs, then Neo4j is not for you.
Schema. A schema in Neo4j refers to indexes and constraints. Neo4j is often described as schema optional, meaning that it is not necessary to create indexes and constraints. You can create data — nodes, relationships and properties — without defining a schema up front.
Dates as values for properties are not directly supported. Depending on your usecase you typically store the millis since epoch (aka date.getTime()) in a long property or a string representation using a DateFormatter (when being in Java land).
The long representation is better suited if you intend to do any math operation with dates. String is better if you want your properties being human readable without any conversion.
When requiring indexes on dates the easiest approach would be storing millis since epoch and apply a schema index on this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With