2
1
0

I used : https://github.com/dbpedia/Dockerized-DBpedia to set up a local endpoint : http://54.173.244.254:8891/sparql

Used this test query : PREFIX  dct:  <http://purl.org/dc/terms/> select distinct ?subject where { ?concept rdfs:label 'Macroeconomics'@en . ?concept ^dct:subject ?subject . }  LIMIT 100

The results in this and that in http://dbpedia.org/sparql are quite different. I want the results to be same in both for all english entries. It would be really helpful if someone could help me achieve that.

    CommentAdd your comment...

    2 answers

    1.  
      2
      1
      0

      Hi,

      when comparing result sets you should be aware that the order is not fixed. The query that you are using selects 100 (out of total 269) ?subjects which fit the pattern. As these subjects are not ordered in the result set, the endpoint can provide an arbitrary order, that is why you get different results when limiting the result.

      Did you check whether the total number of results corresponds? You could insert an ORDER BY ?subject to get the results in the same order and hence the same 100 results in your subset.

        CommentAdd your comment...
      1.  
        1
        0
        -1

        This query can be written more naturally (and more efficiently) like this:

        select distinct * { ?article dct:subject dbc:Macroeconomics} 

        Not sure how you guys got 269, I get 24 on dbpedia.org and 26 on live.dbpedia.org using this count:

        select count(distinct *) { ?article dct:subject dbc:Macroeconomics}

        The reason you may be getting a different result on a local installation is if you load a different release from what dbpedia.org is running.


          CommentAdd your comment...