0

The query in question is

PREFIX dbo: <http://dbpedia.org/ontology/>
select distinct ?label ?abstract where 
{ 
?concept rdfs:label ?label . 
?concept dbo:abstract ?abstract .
?abstract bif:contains '"self driving cars"' 
filter(langMatches(lang(?label),"en")) 
}

On running this on the dbpedia public endpoint, I am getting : http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&query=PREFIX+dbo%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2F%3E%0D%0Aselect+distinct+%3Flabel+%3Fabstract+where+%0D%0A%7B+%0D%0A%3Fconcept+rdfs%3Alabel+%3Flabel+.+%0D%0A%3Fconcept+dbo%3Aabstract+%3Fabstract+.%0D%0A%3Fabstract+bif%3Acontains+%27%22self+driving+cars%22%27+%0D%0Afilter%28langMatches%28lang%28%3Flabel%29%2C%22en%22%29%29+%0D%0A%7D&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=30000&debug=on

This is what I was looking for. However, running the same on my server, gives me : http://34.195.108.80:8891/sparql?default-graph-uri=&query=PREFIX+dbo%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2F%3E%0D%0Aselect+distinct+%3Flabel+%3Fabstract+where+%0D%0A%7B+%0D%0A%3Fconcept+rdfs%3Alabel+%3Flabel+.+%0D%0A%3Fconcept+dbo%3Aabstract+%3Fabstract+.%0D%0A%3Fabstract+bif%3Acontains+%27%22self+driving+cars%22%27+%0D%0Afilter%28langMatches%28lang%28%3Flabel%29%2C%22en%22%29%29+%0D%0A%7D&format=text%2Fhtml&timeout=0

Please point me to how I can get results similar to the public endpoint on my endpoint.

  • Have you loaded the same data? – UninformedUser May 23 '17 at 08:43
  • yes. The server was setup similar to : https://joernhees.de/blog/2014/11/10/setting-up-a-local-dbpedia-2014-mirror-with-virtuoso-7-1-0/ – Kaustabh Datta Choudhury May 23 '17 at 08:46
  • Ok, at least the resources and corresponding abstracts are contained in your dataset. But it looks like the fulltext index doesn't work as expected, at least not for the abstracts. How did you configure the index? Did you run the command from ISQL? I guess you loaded the abstracts later and build the index before, thus, there is nothing in the index. – UninformedUser May 23 '17 at 09:59
  • Add the rule `DB.DBA.RDF_OBJ_FT_RULE_ADD (null, null, 'All');` in ISQL if not already done and update the index via `DB.DBA.VT_INC_INDEX_DB_DBA_RDF_OBJ ();` – UninformedUser May 23 '17 at 10:00
  • Hi, I just tried that, Doesn't work :( – Kaustabh Datta Choudhury May 23 '17 at 14:53
  • Hm, the problem is that the index seems to work not as expected for the abstract literal values. If you run the search on the labels it works perfectly. – UninformedUser May 23 '17 at 20:32
  • Yes. I have been running queries on labels and it works like a charm. But abstracts are a separate story altogether – Kaustabh Datta Choudhury May 25 '17 at 06:53
  • For me it looks like an issue with the indexing. I setup DBpedia on Virtuoso and it always worked with the text-index. Not sure, maybe you have to delete and re-build the index: `DB.DBA.RDF_OBJ_FT_RECOVER();` – UninformedUser May 25 '17 at 08:19
  • You could also show me the indexing rules by calling `SELECT * FROM DB.DBA.RDF_OBJ_FT_RULES;` – UninformedUser May 25 '17 at 08:20

0 Answers0