Re: [Neo4j] Is it possible to count common nodes when traversing?

2010-07-09 Thread Mattias Persson
(); } return result; } -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Java Programmer Sent: Thursday, July 08, 2010 8:12 AM To: Neo4j user discussions Subject: Re: [Neo4j] Is it possible to count common nodes when

Re: [Neo4j] Is it possible to count common nodes when traversing?

2010-07-09 Thread Mattias Persson
Subject: Re: [Neo4j] Is it possible to count common nodes when traversing? Hi, Thanks for your answer but it's not exactly what I was on my mind - word can belong to several categories, and different words can share same category e.g.: word 1 : category 1, category 2, category 3 word 2

[Neo4j] Is it possible to count common nodes when traversing?

2010-07-08 Thread Java Programmer
Hello, I have two nodes [Word] and [Category], each [Word] can have a [Category], and different [Word] can share same [Category]. [Word] to another [Word] has relationship SIMILAR, [Word] to [Category] has relationship Category. I need to count how many Words is in Category, up to given depth.

Re: [Neo4j] Is it possible to count common nodes when traversing?

2010-07-08 Thread Craig Taverner
Your description seems to indicate that each word only belongs to one category, and if you want the category count, you will always get 1. But your code indicates tat: - You are counting the categories for similar works also - You are searching to depth 2 for both similar and category

Re: [Neo4j] Is it possible to count common nodes when traversing?

2010-07-08 Thread Java Programmer
Hi, Thanks for your answer but it's not exactly what I was on my mind - word can belong to several categories, and different words can share same category e.g.: word 1 : category 1, category 2, category 3 word 2 : category 2, category 3 word 3 : category 3 there is relation between word 1 and

Re: [Neo4j] Is it possible to count common nodes when traversing?

2010-07-08 Thread Rick Bullotta
; } -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Java Programmer Sent: Thursday, July 08, 2010 8:12 AM To: Neo4j user discussions Subject: Re: [Neo4j] Is it possible to count common nodes when traversing? Hi, Thanks for your