The Wayback Machine - http://web.archive.org/web/20200905062441/https://github.com/JanusGraph/janusgraph/issues/1573
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible incosistency in chapter 5 documentation #1573

Open
xmichaelx opened this issue May 12, 2019 · 1 comment · May be fixed by #1873
Open

Possible incosistency in chapter 5 documentation #1573

xmichaelx opened this issue May 12, 2019 · 1 comment · May be fixed by #1873

Comments

@xmichaelx
Copy link

@xmichaelx xmichaelx commented May 12, 2019

In Chapter 5. Schema and Data Modeling first there is paragraph:

The default cardinality setting is SINGLE. Note, that property keys used on edges and properties have cardinality SINGLE. Attaching multiple values for a single key on an edge or property is not supported.

and then example:

mgmt = graph.openManagement()
follow = mgmt.makeEdgeLabel('follow').multiplicity(MULTI).make()
name = mgmt.makePropertyKey('name').dataType(String.class).cardinality(Cardinality.SET).make()
mgmt.addProperties(follow, name)
mgmt.commit()

doesn't this example contradict that edges can't have multiple values for a single key?

@chupman
Copy link
Member

@chupman chupman commented May 13, 2019

This feels weird to type, but I think the clarity issue results from a lack of CAPS.

The default cardinality setting is SINGLE. Note, that property keys used on edges and properties have cardinality SINGLE. Attaching multiple values for a SINGLE key on an edge or property is not supported.

In the code example you listed an edge label and a property key being added to an edge. The quote is saying you can't add multiple values to an edge label or property key with a cardinality of SINGLE.

Think of SINGLE as a normal key value pair where only one value is supported

"name": "Bob"

A Cardinality of Set could have multiple values

names: ["Sally", "Frank", "Joan"]

This would be an easy first PR for anyone that wants to either make the last single CAPs or rewrite the sentence to be more clear.

@jaybob007 jaybob007 linked a pull request that will close this issue Oct 29, 2019

0 of 10 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.