简体   繁体   English

DBPedia Sparql端点:关键字可选

[英]DBPedia Sparql Endpoint: keyword OPTIONAL

I'm trying to run the following SPARQL query: 我正在尝试运行以下SPARQL查询:

SELECT ?band, ?genre
WHERE
{
      ?band a umbel-rc:Band_MusicGroup.
      OPTIONAL{?band dbo:genre ?genre}.
}

but in the result there are no bands for which a dbo:genre is not defined (such as Coldplay look here ). 但结果是,没有定义dbo:genre乐队(如Coldplay look here )。 Optional does not work in DBpedia? 可选在DBpedia中不起作用吗?

Thank's to @StanislavKralin I understand now that you might be confused by missing data in the resultset, eg Coldplay. 感谢@StanislavKralin,我现在知道,结果集中的数据丢失可能会使您感到困惑,例如Coldplay。 The short answer here is that the Virtuoso triple store on which DBpedia is deployed has a default resultset size limit of 10000 , ie at most 10000 rows will be returned with a single query. 简短的答案是,部署了DBpedia的Virtuoso三元存储的默认结果集大小限制为10000 ,即,单个查询最多返回10000行。 If you want to get more results you have to use something that's often referred to as pagination, ie for each chunk you append 如果要获得更多结果,则必须使用通常被称为分页的内容,即对于您添加的每个chunk

ORDER BY ?band LIMIT 10000 OFFSET 10000*chunk

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM