thanks for reply. I may have dozens of vertex, where I want to know the common ancestor; I may implement in Java, but I want to use the orientdb services; if any
On Tuesday, 31 March 2015 02:46:01 UTC+1, Natal Kaplya wrote: > Probably you should use shortestPath() >> <http://www.orientechnologies.com/docs/last/SQL-Functions.html#shortestpath> >> function >> if there are only two vertices, and your LCA is the vertex where edge >> direction changes. > > If there are few vertices, you can make few shortestPath() queries passing > in, at first, any two vertices, than returned LCA of those 2 and any vertex > of the rest. When all vertices come to end, the returned LCA is yours. > Also you can write some Java code for this functionality. > > If you use gremlin, you can look here > <http://stackoverflow.com/questions/22218809/common-ancestor-in-a-titan-graph> > . > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
