Justine, in order to get really full control over how you are using the algos, would you be able to write a simple plugin that can handle this in Java, along the lines of http://docs.neo4j.org/chunked/snapshot/server-plugins.html ?
Otherwise, you can use any scripting language and send script code to a plugin. We are right now doing a very simple one in order to execute Gremlin (or any Groovy code) through the REST API, see https://github.com/peterneubauer/neo4j-gremlin-plugin/blob/master/src/main/java/org/neo4j/server/plugin/gremlin/GremlinPlugin.java for a very early draft. Would a Java plugin work for you to start with? In there, you can use the full API, like in http://components.neo4j.org/neo4j-graph-algo/stable/ Cheers, /peter neubauer 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 - Your high performance graph database. http://startupbootcamp.org/ - Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Wed, Mar 30, 2011 at 8:04 PM, Justine Mathews <[email protected]> wrote: > The solution is not really working for me... > > Actually I am trying find paths between the Nodes, based on following > criteria, > > > 1) Combination of Relationships (which is working). > > 2) Maxdepth > > 3) Algoritham - allpaths > > 4) And also I only need paths of certain property value of > relationship(In our case the Property is customerId) > That is when we create relationship we add property(customerId) to it, based > on user group. > If I cannot filter, I will be pulling out more unwanted paths, which will not > really work that way for us.. > Can all the above combination, will work together? > -- > Regards, > Justine K Mathews, MCSD.NET > Mob: +44-(0) 7795268546 > http://www.justinemathews.com<http://www.justinemathews.com/> > http://uk.linkedin.com/in/justinemathews > > > > It looks like you're combining a request to a traversal with a request for > paths (using a graph algorithm) and that won't work. But since "allPaths" is > a very simple traverser with a return filter I think you'll get desired > results with this traversal: > > > > { > > "order": "breadth first", > > "max depth": 1, > > "return filter" : > > { > > "language": "javascript", > > "body": "position.length()>0 && position.endNode().getId()==492 && > position.lastRelationship().getProperty('customerId',0)==1" > > } > > } > > > > Hmm, when I write this I see that max depth is 1... are you just listing > relationships between two nodes with a certain property, customerId=1? I > would like to say that you can get > relationships<http://components.neo4j.org/neo4j-server/milestone/rest.html#Get_relationships_on_node>instead, > > but I realize that you can't supply a filter to it. > > > > 2011/3/30 Justine Mathews > <[email protected]<mailto:[email protected]>> > > > >> Hi, > >> I am trying traverse paths, instead of Nodes.. I am trying the below > >> traverse to get the paths filter by the relationship property customerId. > >> The filter not working, please let me know is there a way to get the > >> filter working... > >> {"order": "breadth first","return filter": { > >> "language": "javascript", > >> "body": "position.length() > 0 && > >> position.lastRelationship().getProperty('customerId',0) == 1" > >> },"max depth": 1,"algorithm": "allPaths","to": " > >> http://localhost:7474/db/data/node/492"} > >> -- > >> Regards, > >> Justine K Mathews, MCSD.NET > >> Mob: +44-(0) 7795268546 > >> http://www.justinemathews.com<http://www.justinemathews.com/<http://www.justinemathews.com%3chttp:/www.justinemathews.com/>> > >> http://uk.linkedin.com/in/justinemathews > >> > >> _______________________________________________ > >> Neo4j mailing list > >> [email protected]<mailto:[email protected]> > >> https://lists.neo4j.org/mailman/listinfo/user > >> > > > > > -- > Regards, > Justine K Mathews, MCSD.NET > Mob: +44-(0) 7795268546 > http://www.justinemathews.com<http://www.justinemathews.com/> > http://uk.linkedin.com/in/justinemathews > > _______________________________________________ > Neo4j mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user > _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

