I have relationships between nodes which are only valid for a specific time. Simple example: Person P lived at Address A from time t1 to time t2. I can put a validFrom and a validUntil property on the relationship, but when using cypher, I have to filer this in the WHERE clause, but I would want it in the MATCH clause.
The reason why I want this in the MATCH clause is that it may potentially traverse a large subgraph, only to find out later that most of it could be ignored. This is especially so with a large set of historic relationships.
I can make seperate validFrom and validUntil relationships to specific date nodes. That way I can use MATCH. This would be OK if I have a limited set of such time nodes, but when I have to store timestamps it is not practical to do this.
How can you optimize Cypher for this type of querying? How to time-slice a graph with nodes and relationships having time-validity indicators?