OK - first, take this information with a grain of salt because I'm new to OrientDb and haven't actually rolled out a successful release but.....
*Thought #1: Get 'Groovy' with it....* I've been reading all the ways you can write server functions (store procedures) and one is Groovy which seems to relate to or also be called 'Gremlin' or 'TinkerPop' or 'Blueprints'. https://github.com/tinkerpop/blueprints/wiki/OrientDB-Implementation - "Blueprints is the default Java API for OrientDB, so you don’t need to include additional modules. For more information look at OrientDB Blueprints API." I ran across this 'Coin Step' yesterday when scanning the TinkerPop3 documentation. >From http://tinkerpop.incubator.apache.org/docs/3.0.0-incubating/#coin-step Coin Step To randomly filter out a traverser, use the coin()-step (*filter*). The provided double argument biases the "coin toss." e.g. gremlin> g.V().coin(0.5) Order Step When the objects of the traversal stream need to be sorted, order()-step ( *map*) can be leveraged. I noticed 'shuffle' -- "Randomizing the order of the traversers at a particular point in the traversal is possible with Order.shuffle." e.g. gremlin> g.V().hasLabel('person').order().by(shuffle) Groovy statements do work as server functions so maybe this is something that you could use? References. *Thought #2: 'JavaScript'*You can always write a store proc that generates a random number 0 to size() and steps ahead that number of steps. *For anyone that knows, please correct me.* -- --- 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.
