Hi,
I'm currently working with the latest DBpedia dataset in Virtuoso OS
Edition (5.06). I'm trying to do the equivalent of a SQL LIKE using
SPARQL on a resource subject. So in SQL this would have been something
like :
SELECT * FROM pages WHERE page_title LIKE "Queen%Elizabeth"
This would perform a case insensitive match on Queen(anything)Elizabeth
(at least in mySQL).
I have tried the following in my virtuoso instance :
SELECT ?subject ?predicate ?object WHERE {
?subject ?predicate ?object.
FILTER(?subject like "^http://dbpedia.org/resource/Queen.*Elizabeth$")
}
SELECT ?subject ?predicate ?object WHERE {
?subject ?predicate ?object.
FILTER regex(?subject,
"^http://dbpedia.org/resource/Queen.*Elizabeth$", "i")
}
These both take well over a minute to return (and the first doesn't seem
to be case insensitive), which isn't acceptable for my particular
application.
Is there quick way to do what I want ? Are there any indexes I could
apply to improve things (I have already created the indexes specified at
http://www.openlinksw.com/dataspace/kide...@openlinksw.com/weblog/kide...@openlinksw.com's%20BLOG%20%5B127%5D/1298)
?
Or do I need to create a conventional SQL table of resource names and
then do a SQL LIKE query on those ?
Thanks,
Rob