Hi all, So, I've got the following rough structure: A "document" vertex - the class is called "document" A "metadata" vertex - the class is called "metadata" A weighted edge connecting them - the class is called "metadata_of"
A single document may connect to many metadata vertexes, and many documents may connect to a single metadata vertex. I have two primary questions Starting from a random document, I'd like to write a function that will walk to another document some random number of steps away. The traversal should be weighted both on the centrality of the metadata vertices and the weight of the connections to those vertices. Is it possible to write stored scripts in either the Orient query language, or Gremlin, that will allow quick execution of this task, and parameterized input to tweak the degree to which the weights and centrality play on the random walk? Any pointers on how I might start off with this? My primary language is Python, but I can make this work in whatever, if need be. Second, if I wanted to take a collection of documents and aggregate all the weights of all their constituent metadata edges, how would I do this? That is to say I have (Doc 1)--(edge weight 0.562) -->(Metadata 1) (Doc 1)--(edge weight 0.124) -->(Metadata 2) (Doc 2)--(edge weight 0.553) -->(Metadata 1) (Doc 2)--(edge weight 0.123) -->(Metadata 3) (Doc 3)--(edge weight 0.234) -->(Metadata 1) (Doc 3)--(edge weight 0.274) -->(Metadata 4) I want to be able to select doc 1 and doc 3 and have a resulting set of weights like the following: Metadata 1: 0.796 Metadata 4: 0.274 Metadata 2: 0.124 The exact nature of the method of combining the documents may change (not necessarily straight addition), but the end result would be the same, I want to be able to easily aggregate the weight of all the concept links from a definable set of documents. Is there a good way to do this in the orient query language, or Gremlin? I definitely have a preference for Gremlin for portability's sake, but if there's a fast/easy way to do it in the orient query language directly as well that'd be totally fine! Thanks, Josh Harrison -- --- 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.
