Semantic search

Jump to navigation Jump to search
Stepnamekindreferencejavadoctexttestlevel
GremlinaddEsideEffectaddedge-stepaddE-java.lang.String-is used to add edges to the graph2
GremlinaddVsideEffectaddvertex-stepaddV-java.lang.String-is used to add vertices to the graph2
GremlinaggregatesideEffectaggregate-stepaggregate-java.lang.String-is used to aggregate all the objects at a particular point of traversal into a Collection2
Gremlinandfilterand-stepand-org.apache.tinkerpop.gremlin.process.traversal.Traversal...-ensures that all provided traversals yield a result2
Gremlinasmodulatoras-stepas-java.lang.String-java.lang.String...-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 path2
GremlinbothflatMapmaps the current elements to the vertices at the boths ends of the edges.2
GremlinbothEflatMapmaps the current elements to both the in and outgoing edges.2
GremlinbothVflatMapmaps the current edges to both the ingoing and outgoing Vertices.2
Gremlinbranchgeneralgeneral-stepsSplits the traverser2
Gremlinbymodulatorby-stepby--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.2
Gremlincapbarriercap-stepcap-java.lang.String-java.lang.String...-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.3
Gremlinchoosebranchchoose-stepchoose-java.util.function.Function-,choose-java.util.function.Predicate-org.apache.tinkerpop.gremlin.process.traversal.Traversal-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.2
GremlincoalesceflatMapcoalesce-stepThe coalesce()-step evaluates the provided traversals in order and returns the first traversal that emits at least one element.2
Gremlincoinfiltercoin-stepcoin-double-randomly filters out traversers with the given probability2
Gremlincountreducing barriercount-stepcount--counts the total number of represented traversers in the streams (i.e. the bulk count).3
Gremlinemitmodulatoremit-stepemit--is not an actual step, but is instead a step modulator for repeat() (find more documentation on the emit() there).2
Gremlinexplainterminalterminal-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.2
Gremlinfillterminalterminal-stepsfill(collection) will put all results in the provided collection and return the collection when complete.2
Gremlinfiltergeneralgeneral-stepsContinues processing based on the given filter condition.2
GremlinflatMapgeneralgeneral-stepstransforms the current step in a one to many fashion.2