On Tue, Oct 11, 2011 at 10:00 PM, <dieter_f...@gmx.net> wrote:

> Hi,
>
> in my database I have different types of data (e.g. addresses, projects,
> activities, milestones, documents) that are connected via relationships.
> Now, I want to give the user of my application the possibilites to find
> parts of the graph which entirely fits the criteria. The criteria targets
> the data (e.g. only addresses from the US) as well as the relationships
> between the data (e.g. only relationships that have the type "general").
> From what understood this can easily be done with cypher.
>
> However, how do I do it when the number of relationships and nodes is more
> than 1?
>

Have a look here:
http://docs.neo4j.org/chunked/snapshot/query-match.html#match-multiple-relationships


>
> Here an example:
>
> Address
> (only addresses from the US)
>  |
> (relationship with the type "contract")
>  |
> Project
> (only projects for which the end date is in the future)
>  |
>  |
>  |
> Milestone
> (only milestones that are this month)
>


A query to get related data given a known project, could look something like
this.

START project=node(...)
MATCH address-[:contract]->project<--milestone
RETURN address, milestone

Did that answer your questions?

Andrés



> And there are more examples possible with even longer paths...
>
> Thanks!
> --
> Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
> belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to