LinkedMDB SPARQL结果比预期少? [英] LinkedMDB SPARQL results with fewer results than expected?

查看:79
本文介绍了LinkedMDB SPARQL结果比预期少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用链接的开放数据进行本体比对发现的幻灯片14 表示LinkedMDB数据集中有50,603个参与者.使用以下查询,我得到2500.谁在这里错了?,查询中是否缺少某些内容?为什么幻灯片计数如此之高?这是SPARQL查询:

Slide 14 of Ontology Alignment Discovery using Linked Open Data says that there are 50,603 actors in the LinkedMDB dataset. Using the following query, I get 2500. Who is wrong here?, Is there something missing in the query? Why do the slides count such a high number? This is the SPARQL query:

select(count(distinct ?actors) as ?nActors) where {
  ?actors a <http://data.linkedmdb.org/resource/movie/actor> .
}

推荐答案

许多公共终结点都对查询施加了限制,以确保一个行为不佳的客户端不会降低服务的其他用户的性能,或对该服务的其他用户产生不利影响.

Many public endpoints impose limits on queries in order to ensure that one badly behaved client does not bring down/adversely affect performance for other users of the service.

您正在谈论的特定服务的结果限制似乎为2500,例如讨论

The specific service you are talking about appears to have a result limit of 2500 as answers like this discuss

某些服务还可能具有执行时间限制,以防止查询运行超过一定时间.

Some services may also have execution time limits that prevent queries running beyond a certain amount of time.

您通常可以通过使用LIMITOFFSET来请求结果页来解决此限制.不幸的是,这似乎对您的查询无济于事,因为您使用的是聚合,并且服务似乎在聚合之前应用了限制.请注意,如果还有其他查询可以使用LIMITOFFSET方法,即那些不使用聚合的查询,则可能还需要添加ORDER BY,这取决于没有它的SPARQL服务,您可能只会收到重复结果相同

You can normally work around this limitation by using the LIMIT and OFFSET to request pages of results. Unfortunately it appears that this won't help your query because you use an aggregate and it appears the service is applying the limit prior to the aggregation. Note that if you have other queries where the LIMIT and OFFSET approach would work i.e. those that don't use aggregation you may also need to add an ORDER BY as depending on the SPARQL service without it you may just receive the same results repeatedly

这篇关于LinkedMDB SPARQL结果比预期少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆