通过 SNORQL 与 SERVICE 查询在 DBpedia 中的结果顺序不同

Different order of results in DBpedia through SNORQL vs. SERVICE query

我正在尝试从 DBpedia 检索有关电影的一些数据。这是我的查询:

PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX : <http://dbpedia.org/resource/>
PREFIX dbpedia2: <http://dbpedia.org/property/>
PREFIX dbpedia: <http://dbpedia.org/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX onto: <http://dbpedia.org/ontology/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>

SELECT *
{{SELECT *

WHERE {
SERVICE<http://dbpedia.org/sparql>{
?movie dcterms:subject <http://dbpedia.org/resource/Category:American_films> ;
        a onto:Film ;
        rdfs:label ?title ;
        dbpedia2:gross ?revenue .

?movie onto:starring ?actorUri .
?actorUri rdfs:label ?actor .

OPTIONAL {
  ?movie onto:imdbId ?imdbId .
}
BIND(xsd:integer(?revenue) as ?intRevenue) .
FILTER ((datatype(?revenue) = 'http://dbpedia.org/datatype/usDollar') && (LANGMATCHES(LANG(?title), 'en')) && (LANGMATCHES(LANG(?actor), 'en'))) .
}
}
}}
ORDER BY DESC (?intRevenue)
LIMIT 40000
OFFSET 0

运行 此查询 http://dbpedia.org/snorql/ (没有 SERVICE 关键字) returns 正确的结果。但是,从第三方三重存储中这样做不会产生相同的顺序(例如:霍比特人和指环王不见了)。

我需要在查询中更改什么才能获得相同的结果?

克服此特定限制的最佳方法是拥有 your own DBpedia mirror,您可以在其上设置自己的限制(包括 none),然后您可以将其用作您的主要或远程数据存储 and/or 查询引擎。

(ObDisclaimer:OpenLink Software provides the public DBpedia SPARQL endpoint, produces Virtuoso and the DBpedia Mirror AMI,并雇用了我。)