You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The actual query has a VALUES clause as the first UNION member (instead of the empty graph pattern) but it suffers from the same empty result set problem
SELECT *
WHERE
{ {
SELECT ?o
WHERE
{
{} # Empty for the sake of a minimal example
UNION
{ ?s ?p ?o FILTER ( ?p = <http://id.loc.gov/ontologies/bibframe/title> )}
}
}
OPTIONAL { ?o <http://www.w3.org/2000/01/rdf-schema#label> ?v_1 }
FILTER ( regex(str(?o), "met", "i") )
}
LIMIT 100
Interestingly the query works when filtering?p to <http://example.org/dbpediaSubject> (instead of <http://id.loc.gov/ontologies/bibframe/title>).
The titles are all literals and the dbpediaSubjects are all IRIs - so apparently the optional block fails to evaluate for literals.
The query APPEARS to work but actually DOESN'T when omitting the str function and writing directly regex(?o, ...):
It seems as if the regex then evaluates to true regardless of ?o's value.
There may be some wacky optimization in place regarding variables in subject positions that are bound to literal values...
The text was updated successfully, but these errors were encountered:
Aklakan
changed the title
Virtuoso Bug
Virtuoso Bug: Query incorrectly evaluates to empty result set; breaks keyword search over literal facet values
Oct 19, 2020
The following query incorrectly returns 0 results on the Virtuoso deployed at http://cord19.aksw.org/sparql
The actual query has a VALUES clause as the first UNION member (instead of the empty graph pattern) but it suffers from the same empty result set problem
Interestingly the query works when filtering?p to
<http://example.org/dbpediaSubject>
(instead of<http://id.loc.gov/ontologies/bibframe/title>
).The titles are all literals and the dbpediaSubjects are all IRIs - so apparently the optional block fails to evaluate for literals.
The query APPEARS to work but actually DOESN'T when omitting the
str
function and writing directlyregex(?o, ...)
:It seems as if the regex then evaluates to true regardless of ?o's value.
There may be some wacky optimization in place regarding variables in subject positions that are bound to literal values...
The text was updated successfully, but these errors were encountered: