Manybubbles added a comment. One of the things that @Thompsonbry.systap and I talked about yesterday was representing statements kind of like this:
wd:Q23 wdt:P39 wd:Q11696 . <------ Optional <<wd:Q23 wd:P39 wd:Q11696>> wdqual:P580 "1789-4-30T00:00:00Z"^^xs:dateTime ; wdqual:P582 "1797-3-4T00:00:00Z"^^xs:dateTime ; wdqual:P1365 wdo:no-value ; wdqual:P1366 wd:Q11806 ; wdref:P143 wd:Q328 ; wdo:rank "normal", "best" . <<<<wd:Q23 wd:P39 wd:Q11696>> wdqual:P580 "1789-4-30"^^xs:date>> wdo:precision "day" . So the takeaways are: 1. Stuff rank as a reified property of the field and -either- filter on it at query time -or- have wikidata dump out the truthy values as separate triples and use convention to support jumping from the truthy tuples to the non-truthy tuples. If we find that filtering is generally fast enough then we can add an AST rewrite to automatically add the filtering. 2. Stuff most of the value information as reification information on the statement itself. Like I did with the date precision. It looks pretty wordy when its on a qualifier but it'd be less crazy looking. A few more interesting points about RDR in BlazeGraph: 1. Its automatically used if you enable its property (statement identifiers or something) and you send data as standard triples that looks like the RDF standard for reification. I haven't hunted down this code but if it works that'd be super cool. We'd simply have to dump the RDF data in normal looking RDF and BlazeGraph can efficiently represent it. Its like RDR is just an optimization that can be transparently applied. This will require more investigation. 2. RDR can be nested like in the example above. 3. RDR works by using the triple's bytewise representation as the subject, predicate, or object. Generally this doesn't require too much space. Another interesting point: 1. BlazeGraph has vocabulary classes that allow it to efficiently represent certain uris that are known up front. You can add entries to them but if the new uri is already in the dictionary then bad things happen. So the usual way to use these is to name them BlahVocabularyV1, BlahVocabularyV2, etc. The old versions stick in case you want to open up an old knowledge base. You can use the new versions by rebuilding the knowledge base. TASK DETAIL https://phabricator.wikimedia.org/T90119 REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>. EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Manybubbles Cc: Thompsonbry.systap, Smalyshev, Manybubbles, Aklapper, Haasepeter, Beebs.systap, daniel, jkroll, Wikidata-bugs, Jdouglas, aude, GWicke, JanZerebecki _______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs