-
Notifications
You must be signed in to change notification settings - Fork 23
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
describing property-based indexing as a variant of data indexing #145
Conversation
Looks like the Travis config needs a tweak; I’ll look into that. |
We'll also need to update the definition of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks great! There are a couple of additions we'll need, as noted in comments.
Yes, but we should probably discuss before on a call whether we want to keep |
As I'm implementing this, I note some other things that seem to be requirements, or if not, add much more complication: Consider the following example: {
"@context": {
"@version": 1.1,
"@vocab": "http://example.com/",
"author": {"@container": "@index", "@index": "prop"},
"prop": {"@type": "@vocab"}
},
"@id": "http://example.com/article",
"author": {
"regular": {"@id": "http://example.org/person/1"},
"guest": [
{"@id": "http://example.org/person/2"},
{"@id": "http://example.org/person/3"}
]
}
}
Additionally, a node object containing both There are likely more complications, and possibly some corner cases I've neglected. |
2f733d7
to
f2dc97d
Compare
Gosh, I knew a bunch of worms were lurking from inside that shiny can! Regarding the values in the index map, I'm ok to contrain them to be simple object nodes (no Regarding the property used for indexing, my idea was that it would always have simple string values. It is tempting to use vocabulary-relative IRIs, but is there a real use case for that (beyond type indexing or id indexing)? I think I would prefer to keep term definitions out of the picture for the indexing property, because they would bring too much complexity and too many corner cases (
Sorry, I don't get it. In the expanded form, we only have expanded values, right? |
I think keeping them as term definitions works. The important thing is that, in the compact view, the value of the property is expressed as a string. The point on prop being a term when compacting is so that we know how to compact the value of "prop" to use as an index. Of course, if we only allowed simple values we could avoid this, but it seems to me to be useful to allow anything that compacts as a string to be used as an index. The main complicating area is for named graph indexing, but I think this is a vanishingly small use case. I did consider that as an alternative to leveraging |
f2dc97d
to
949497c
Compare
949497c
to
c3db5f5
Compare
Add comment in example.
The prefix dc is used everywhere else for DC terms
the <a>keyword</a> <code>@none</code>, | ||
or a <a>term</a> which expands to <code>@none</code>, | ||
and the values MUST be <a>node objects</a>.</p> | ||
<a>terms</a>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the previous version limited this to "terms expaning to @none", but for type-map, it seems to me that any term can be used (at least, this works in the playground and the Ruby distiller)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is in the Type Maps section, which has always allowed terms.
Okay, I think that this, and w3c/json-ld-api#78 are ready. We can always tweak further. |
Preview | Diff