Hi Rafael,
I am not too hands on with these problems, but others here are.
however, I see two ways to do what you want:

1. Neo4j Traverser
--------------------------
Using the Neo4j Java API, you could do an exhaustive search for J
-(knows)-> P -(friends)-> M and have a custom ReturnableEvaluator,
much like in http://wiki.neo4j.org/content/IMDB_Finding_the_Path that
checks if these two relationships are present on the current node.

2. RDF
----------

Using SparQL, http://www.w3.org/TR/rdf-sparql-query/, and the Neo4j
RDF components http://components.neo4j.org/, you could build up a RDF
graph and ask that one with SparQL. Quite unneccesary for this use
case IMHO but it probably would work.

HTH

/peter

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org     - New Energy for Data - The Graph Database.
http://www.ops4j.org     - New Energy for OSS Communities - Open
Participation Software.
http://www.qi4j.org        - New Energy for Java - Domain Driven Development.



On Tue, Jun 9, 2009 at 7:40 PM, Rafael Almeida<[email protected]> wrote:
>
> Hello, I just found out about neo4j and I think it is interesting and it 
> could be very useful for the application I'm currently working on.
>
> One of my requirements is to find a subgraph inside of a bigger graph. For 
> example, let's say we have a big graph of people's relationship, the subgraph 
> I want to find might be to find any Josh which knows some Paul and that Paul 
> is friends with some Melissa. Considering only the initials, this is the 
> subgraph I'm looking for J -(knows)-> P -(friends)-> M.
>
> Is neo4j good for that kind of query? Would it be simple to write? Would it 
> be scalable?
>
> Thank you for your attention,
> Rafael
>
>
>
> _______________________________________________
> Neo mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to