JanZerebecki added a comment.

>>! In T76373#799504, @Smalyshev wrote:
> # How to handle qualifiers? As an example, such ones as point-in-time and 
> start-date/end-date. Most queries we'd do probably would be interested in 
> current values, but some may need past values. 

For queries not explicitly asking for something besides the best, current 
consensus ranks are used to select the relevant statements. I.e. every time one 
selects a statement only use those that are rank preferred if a one of that 
rank exist for that property otherwise those of rank normal. Statements ranked 
as deprecated should be ignored unless specified otherwise in the query. See 
https://www.wikidata.org/wiki/Help:Ranking .

But yes for e.g. for a query like who was the major of Berlin in 1984 you would 
need to look at statements that are 1) ranked preferred or normal and 2) that 
have a qualifier start-date which is <=1984 and 3) that do not have a qualifier 
end-date or whose end-date is >= 1984 .

>   ## With properties, it's easier because we can just stuff everything into a 
> vertex, but we need some standard format of storing non-current data.
>   ## With edges we have a potential to pollute the graph with myriad of data 
> that we will have to filter out on each query. We may distinguish them by 
> edge properties, but that could complicate many queries. Alternatively, we 
> could make special "past" edges - named with prefix, etc. - so that queries 
> interested in non-current data 

All this should not be decided based on ranks not qualifiers. However if you 
evaluate which statements (based on rank) are to be considered by default on 
import then if you still want to answer questions like the above historic one 
you still need a solution to be able to specifically query for 
preferred/normal/deprecated statements ignoring default.

>   ## Any such processing would require ad-hoc handing of specific properties, 
> such as point-in-time and start/end, to identify which data is current and 
> which is not. We may need to be careful with this since wrong handling of 
> this on initial import would require re-scan of the whole data set.

No, as above. Queries not explicitly asking for something besides the best, 
current consensus do not need to understand qualifiers, only ranks. That should 
remove that possibility of incorrect interpretation during import.

TASK DETAIL
  https://phabricator.wikimedia.org/T76373

REPLY HANDLER ACTIONS
  Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign 
<username>.

To: Smalyshev, JanZerebecki
Cc: Smalyshev, Manybubbles, GWicke, JanZerebecki, jkroll, Wikidata-bugs, aude, 
daniel



_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to