Semantic search

Jump to navigation Jump to search
namekindreferencetext
mapgeneralgeneral-stepstransforms 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
repeatbranchrepeat-stepis used for looping over a traversal given some break predicate
choosebranchchoose-steproutes 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.
tryNextterminalterminal-stepswill return an Optional and thus, is a composite of hasNext()/next()
bothVflatMapmaps the current edges to both the ingoing and outgoing Vertices.
inEflatMapmaps the current elements to the the ingoing edges.
outflatMapmaps the current elements to the vertices at the end of the outgoing edges.
outVflatMapThe outV step maps the current edges to the outgoing Vertices.
bymodulatorby-stepis 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.
sumreducing barriersum-stepoperates on a stream of numbers and sums the numbers together to yield a result
inflatMapmaps the current elements to the vertices at the end of the ingoing edges.
orfilteror-stepensures that at least one of the provided traversals yield a result.
emitmodulatoremit-stepis not an actual step, but is instead a step modulator for repeat() (find more documentation on the emit() there).
inVflatMapmaps the current edges to the the ingoing Vertices.
promiseterminalterminal-stepscan 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.
wherefilterwhere-stepfilters the current object based on either the object itself (Scope.local) or the path history of the object (Scope.global) (filter). This step is typically used in conjunction with either #match Step or select()-step, but can be used in isolation.
tailfiltertail-step
pathmappath-step
addVsideEffectaddvertex-stepis used to add vertices to the graph
branchgeneralgeneral-stepsSplits the traverser
labelmaplabel-stepmaps the traversal to the labels of the current elements.
propertysideEffectaddproperty-stepis used to add properties to the elements of the graph
toListterminalterminal-stepswill return all results in a list
asmodulatoras-stepis 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
isfilteris-stepfilters elements that fullfill the given predicate. Variant: Filters elements that are equal to the given Object.
bothflatMapmaps the current elements to the vertices at the boths ends of the edges.
countreducing barriercount-stepcounts the total number of represented traversers in the streams (i.e. the bulk count).
unionbranchrepeat-step
capbarriercap-stepIterates 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.
addEsideEffectaddedge-stepis used to add edges to the graph
filtergeneralgeneral-stepsContinues processing based on the given filter condition.
maxreducing barriermax-stepoperates on a stream of comparable objects and determines which is the last object according to its natural order in the stream.
coalesceflatMapcoalesce-stepThe coalesce()-step evaluates the provided traversals in order and returns the first traversal that emits at least one element.
toSetterminalterminal-stepswill return all results in a set and thus, duplicates removed
optionmodulatoroption-stepAn option to a branch() or choose()
andfilterand-stepensures that all provided traversals yield a result
outEflatMapmaps the current elements to the the outgoing edges.
bothEflatMapmaps the current elements to both the in and outgoing edges.
iterateterminalterminal-stepsIterates 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
foldreducing barrierfold-stepThere 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.
explainterminalterminal-stepswill 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.
ordermaporder-steporders the traversal elements
selectmapselect-step
limitfilterlimit-step
fillterminalterminal-stepsfill(collection) will put all results in the provided collection and return the collection when complete.
meanreducing barriermean-stepoperates on a stream of numbers and determines the average of those numbers.
sideEffectgeneralgeneral-stepsperforms some operation on the traverser and passes it to the next step.
toBulkSetterminalterminal-stepswill return all results in a weighted set and thus, duplicates preserved via weighting
coinfiltercoin-steprandomly filters out traversers with the given probability
minreducing barriermin-stepoperates on a stream of comparable objects and determines which is the first object according to its natural order in the stream.