Without repeating full match again (no index used), my query is taking 8 minutes. I have a graph DB with 150 nodes as I am testing currently, but in future it will have large number of nodes.
Two things I wish to ask you: 1) All my nodes have 'crime_type' as an attribute. I have not give any specific labels for nodes when I am creating graph. All nodes are crime incidents. Now Can I make label out of attribute 'crime_type' and then use it for indexing? If so, how can I do it? Please elaborate 2) The above query as I posted before is mysteriously giving me the count of all nodes of different types rather than based on 'relationship matches' I have used. The actual count of nodes involved in such 'match' is less. But the result I am getting is count of all nodes of different crime types. Is my formulation of query wrong? Please help. On Friday, 3 October 2014 19:00:34 UTC+5:30, Mohana Krishna, IIT Bombay, India wrote: > > I have issued a following query as part of my application: > > > MATCH > > (k{type:"ASSAULT"})-[r1:CLOSE_TO]->( l {type:"BATTERY"}), > > (k{type:"ASSAULT"})-[r2:CLOSE_TO]->(m{type:"THEFT"}), > > (k{type:"ASSAULT"})-[r3:CLOSE_TO]->(n{type:"NARCOTICS"}), > > ( l {type:"BATTERY"})-[r4:CLOSE_TO]->(m{type:"THEFT"}), > > ( l {type:"BATTERY"})-[r5:CLOSE_TO]->(n{type:"NARCOTICS"}), > > (m{type:"THEFT"})-[r6:CLOSE_TO]->(n{type:"NARCOTICS"}) > > return count(distinct(k)) as k_count, count(distinct(l)) as l_count, > count(distinct(m)) as m_count , count(distinct(n)) as n_count; > > > The query is running indefinitely without giving results. I have > cross-checked but could not find any error. Am I missing something? Is > there a limit on maximum number of matches that can be done?? > > Please help. > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.