I am new to neo4j. and i really need your help. my case is:
In a city, there are hundreds of thousands of hotels, I use the nodes with label 'Hotel' represent it. Each hotel has property hotel_name, hotel_address, hotel_telephone...
And also there are millions of persons. I use the nodes with label 'Person' to represent person, each person has property person_name, person_identity, person_age.
When a person checked into a hotel, I create a relationship from Person node to Hotel node, the relationship has property in_time with format '20130820134000' (YYYYMMDDHHMISS).
I have enable the auto-index:
node_auto_index with property key: hotel_name, person_name, person_identity
relationship_auto_index with property key: in_time
And there are tens of millions of relationships in my neo4j db.
Now i want to query that what persons checked into hotel between time point '20130910080000' and '20130911080000', both with limit person_age equal to 20.
my cypher is below:
start r = relationship:relationship_auto_index('in_time:[20130910080000 TO 20130911080000]')
match (p:Person)-[r]-(h:Hotel)
where p.person_age=20
return p,r,h
but this cypher above runs very slower, how should i do? Any help will be appreciated.