Semi-unrelated, but I started on some code for this in my regex-compile branch: https://github.com/arekinath/d2rq/commits/feature/regex-compile
It works well as long as you don't mind the fact that the underlying RDBMS might not support every single regex construct (it makes no effort to filter them to a common subset or correct anything). The SQL LIKE compiler seems to work quite well too (so simple things like regex(?bar, '^foo') get compiled to bar LIKE 'foo%' or equivalent) I keep patching things onto 0.8.x though instead of "develop" -- I'm not sure if you're interested at all in doing new features on the older branch, so maybe I should rewrite it sometime? On 14 Apr 2014, at 8:44 pm, Richard Cyganiak <rich...@cyganiak.de> wrote: > Hi Peter, > > D2RQ currenty doesn’t translate string functions like REGEX (or SUBSTR which > would be more appropriate here) to SQL. This means it will evaluate the query > by retrieving all names and doing the regex evaluation in Java code. Now, the > DBLP service is apparently run in restricted mode where a LIMIT 10000 is > applied to all SQL queries. These two things taken together lead to > incomplete results here. > > Possible solutions: > > a) Wait until dblp.l3s.de upgrades to some future version of D2RQ that solves > the above limitation > > b) Obtain an RDF dump of the dataset, load it into your own local RDF store, > and run the SPARQL query locally against that. > > Best, > Richard > > > On 10 Apr 2014, at 14:41, Wetz Peter <peter.w...@tuwien.ac.at> wrote: > >> Dear all, >> >> as already explained on the public-lod list at the W3C (see [1]), I have a >> problem querying the DBLP SPARQL endpoint at [2]. I want to apply the >> Regex-Filter in order to get only authors who match the Regex. I think this >> is the only way to search for authors, if I want to do some sort of >> string-based search. As I did not get the expected results with my query, I >> found, that the REGEX is only applied to the first 10.000 results, since >> this is obviously the result limit. >> >> Therefore, the following query, which aims at returning authors starting >> with the letter “B”, yields 0 results: >> >> SELECT DISTINCT * WHERE { >> ?a a foaf:Agent . >> ?a foaf:name ?n . >> FILTER regex(?n, '^b', 'i') >> } >> LIMIT 10 >> >> Is there any other way to find authors starting with “B”? Am I missing >> something? >> >> Best regards, >> Peter >> >> [1] http://lists.w3.org/Archives/Public/public-lod/2014Apr/0025.html >> [2] http://dblp.l3s.de/d2r/snorql/ >> >> ------------------------------------------------------------------------------ >> Put Bad Developers to Shame >> Dominate Development with Jenkins Continuous Integration >> Continuously Automate Build, Test & Deployment >> Start a new project now. Try Jenkins in the cloud. >> http://p.sf.net/sfu/13600_Cloudbees_______________________________________________ >> d2rq-map-devel mailing list >> d2rq-map-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > d2rq-map-devel mailing list > d2rq-map-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ d2rq-map-devel mailing list d2rq-map-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel