spmallette commented on code in PR #3483:
URL: https://github.com/apache/tinkerpop/pull/3483#discussion_r3494100020
##########
docs/src/reference/implementations-tinkergraph.asciidoc:
##########
@@ -219,6 +220,31 @@ g.io("data/tinkerpop-crew.kryo").read().iterate()
g.V().properties()
----
+[[tinkergraph-multi-label]]
+=== Multi-Label Support
+
+TinkerGraph supports multiple labels per vertex when
`gremlin.tinkergraph.vertexLabelCardinality` is set to
+`ONE_OR_MORE` or `ZERO_OR_MORE`. This enables use of the `addLabel()`,
`dropLabel()`, `dropLabels()`, and `labels()`
+traversal steps.
+
+[source,groovy]
+----
+conf = new BaseConfiguration()
+conf.setProperty("gremlin.tinkergraph.vertexLabelCardinality", "ZERO_OR_MORE")
+graph = TinkerGraph.open(conf)
+g = traversal().with(graph)
+g.addV("person","employee").property("name","marko").iterate()
+g.V().has("name","marko").labels() // emits: person, employee
+g.V().has("name","marko").addLabel("manager").labels() // emits: person,
employee, manager
+g.V().has("name","marko").dropLabel("employee").labels() // emits: person,
manager
+----
+
+The `hasLabel()` step works with multi-label vertices using OR semantics:
`hasLabel("a","b")` matches any vertex that
+has label "a" OR label "b". To match vertices having both labels, chain
multiple `hasLabel()` calls:
+`hasLabel("a").hasLabel("b")`.
+
+IMPORTANT: Edge labels are currently fixed at cardinality `ONE` and are not
configurable.
Review Comment:
do we still even have a notion of edge cardinality?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]