Semantic search

Jump to navigation Jump to search

|- |addE |sideEffect |addedge-step |addE |is used to add edges to the graph |-|- |addV |sideEffect |addvertex-step |addV |is used to add vertices to the graph |-|- |aggregate |sideEffect |aggregate-step |aggregate |is used to aggregate all the objects at a particular point of traversal into a Collection |-|- |and |filter |and-step |and |ensures that all provided traversals yield a result |-|- |as |modulator |as-step |as |is not a real step, but a "step modulator" similar to by() and option(). With as(), it is possible to provide a label to the step that can later be accessed by steps and data structures that make use of such labels — e.g., select(), match(), and path |-|- |both |flatMap | | |maps the current elements to the vertices at the boths ends of the edges. |-|- |bothE |flatMap | | |maps the current elements to both the in and outgoing edges. |-|- |bothV |flatMap | | |maps the current edges to both the ingoing and outgoing Vertices. |-|- |branch |general |general-steps | |Splits the traverser |-|- |by |modulator |by-step |by |is not an actual step, but instead is a "step-modulator" similar to as() and option(). If a step is able to accept traversals, functions, comparators, etc. then by() is the means by which they are added. The general pattern is step().by()…by(). Some steps can only accept one by() while others can take an arbitrary amount. |-|- |cap |barrier |cap-step |cap |Iterates the traversal up to the itself and emits the side-effect referenced by the key. If multiple keys are supplied then the side-effects are emitted as a Map. |-|- |choose |branch |choose-step |choose |routes the current traverser to a particular traversal branch option. With choose(), it is possible to implement if/then/else-semantics as well as more complicated selections. |-|- |coalesce |flatMap |coalesce-step | |The coalesce()-step evaluates the provided traversals in order and returns the first traversal that emits at least one element. |-|- |coin |filter |coin-step |coin |randomly filters out traversers with the given probability |-|- |count |reducing barrier |count-step |count |counts the total number of represented traversers in the streams (i.e. the bulk count). |-|- |emit |modulator |emit-step |emit |is not an actual step, but is instead a step modulator for repeat() (find more documentation on the emit() there). |-|- |explain |terminal |terminal-steps | |will return a TraversalExplanation. A traversal explanation details how the traversal (prior to explain()) will be compiled given the registered traversal strategies. A TraversalExplanation has a toString() representation with 3-columns. The first column is the traversal strategy being applied. The second column is the traversal strategy category: [D]ecoration, [O]ptimization, [P]rovider optimization, [F]inalization, and [V]erification. Finally, the third column is the state of the traversal post strategy application. The final traversal is the resultant execution plan. |-|- |fill |terminal |terminal-steps | |fill(collection) will put all results in the provided collection and return the collection when complete. |-|- |filter |general |general-steps | |Continues processing based on the given filter condition. |-|- |flatMap |general |general-steps | |transforms the current step in a one to many fashion. |-|- |fold |reducing barrier |fold-step | |There are situations when the traversal stream needs a "barrier" to aggregate all the objects and emit a computation that is a function of the aggregate. The fold()-step (map) is one particular instance of this. Please see unfold()-step for the inverse functionality. |-|- |has |filter |has-step |has |filters vertices, edges, and vertex properties based on their properties. This step has quite a few variations. |-|- |hasNext |terminal |terminal-steps | |determines whether there are available results |-|- |id |map |id-step | |maps the traversal to the ids of the current elements. |-|- |in |flatMap | | |maps the current elements to the vertices at the end of the ingoing edges. |-|- |inE |flatMap | | |maps the current elements to the the ingoing edges. |-|- |inV |flatMap | | |maps the current edges to the the ingoing Vertices. |-|- |is |filter |is-step |is |filters elements that fullfill the given predicate. Variant: Filters elements that are equal to the given Object. |-|- |iterate |terminal |terminal-steps | |Iterates the traversal presumably for the generation of side-effects. See https://stackoverflow.com/questions/47403296/iterate-step-is-used-in-the-end-of-the-command-when-creating-nodes-and-edges-t |-|- |label |map |label-step | |maps the traversal to the labels of the current elements. |-|- |limit |filter |limit-step | | |-|- |map |general |general-steps | |transforms the current step element to a new element (which may be empty). see also https://stackoverflow.com/questions/51015636/in-gremlin-how-does-map-really-work |-|- |match |map |match-step | |see https://stackoverflow.com/questions/55609832/is-threre-a-document-about-how-gremlin-match-works |-|- |max |reducing barrier |max-step | |operates on a stream of comparable objects and determines which is the last object according to its natural order in the stream. |-|- |mean |reducing barrier |mean-step | |operates on a stream of numbers and determines the average of those numbers. |-|- |min |reducing barrier |min-step | |operates on a stream of comparable objects and determines which is the first object according to its natural order in the stream. |-|- |next |terminal |terminal-steps | |will return the next result.next(n) will return the next n results in a list |-|- |option |modulator |option-step | |An option to a branch() or choose() |-|- |or |filter |or-step |or |ensures that at least one of the provided traversals yield a result. |-|- |order |map |order-step |order |orders the traversal elements |-|- |out |flatMap | | |maps the current elements to the vertices at the end of the outgoing edges. |-|- |outE |flatMap | | |maps the current elements to the the outgoing edges. |-|- |outV |flatMap | | |The outV step maps the current edges to the outgoing Vertices. |-|- |path |map |path-step | | |-|- |promise |terminal |terminal-steps | |can only be used with remote traversals to Gremlin Server or RGPs. It starts a promise to execute a function on the current Traversal that will be completed in the future. |-|- |property |sideEffect |addproperty-step |property |is used to add properties to the elements of the graph |-|- |range |filter |range-step | | |-|- |repeat |branch |repeat-step |repeat |is used for looping over a traversal given some break predicate |-|- |select |map |select-step | | |-|- |sideEffect |general |general-steps | |performs some operation on the traverser and passes it to the next step. |-