g.V(1).repeat(timeLimit(1000).bothE().otherV().simplePath()).until(hasId(5)).path()
g.V(1).repeat(bothE().otherV().simplePath()).until(hasId(5)).path()
--I run the following query:g.V(1).repeat(timeLimit().bothE().otherV().simplePath()).until(hasId(5)). path.()The broblem is it always runs 120000 miil secondsI would like it to finish when query endsPlease help
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/7ae8e16a-707c-482f-b3ae-ffae1c08f406%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Try passing a value to the .timeLimit() step, in milliseconds:g.V(1).repeat(timeLimit(1000).bothE().otherV().simplePath()).until(hasId(5)).path()However, the following query should "finish" (= it should not timeout), especially if a vertex with the id 5 exists (loop exit condition):g.V(1).repeat(bothE().otherV().simplePath()).until(hasId(5)).path()
Be aware though that what appear to be very simple traversals can quickly become *very* time-consuming, even on small graphs. See: https://www.datastax.com/2017/03/graphoendodonticology
Jean-Baptiste
On Wed, Nov 29, 2017 at 11:15 AM, אלה וייס <ellavs...@gmail.com> wrote:
I run the following query:g.V(1).repeat(timeLimit().bothE().otherV().simplePath()).until(hasId(5)). path.()The broblem is it always runs 120000 miil secondsI would like it to finish when query endsPlease help
--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/dfab9437-2e7e-45cc-a698-5e28e6ece611%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/dfab9437-2e7e-45cc-a698-5e28e6ece611%40googlegroups.com.
If there are more paths, then there's no reason why the query would stop earlier. If you're only interested in the first path, add a .limit(1).Cheers,Daniel
Jean-Baptiste