I’d like to post this here to before posting a bug to github.
This query correctly returns the content of the Named Graph specified by input:default-graph-uri
:
define input:default-graph-uri <https://medium.com/@sdmonroe/vios-dev-content-monetization-8c2a05f4a987>
select ?s1 as ?c1 count (*) as ?c2 where {
select distinct ?s1 ?g {
?s1 a <https://medium.com/@sdmonroe/NewsArticle> .
quad map virtrdf:DefaultQuadMap {
graph ?g { ?s1 ?s1textp ?o1 . ?o1 bif:contains '"vios"' . }
}
}
}
group by ?s1 order by desc 2 limit 15 offset 0
Here is the same query with only the Named Graph changed. It also produces the correct result:
define input:default-graph-uri <https://medium.com/@sdmonroe/vios-reference-implementation-3153a3d589cf>
select ?s1 as ?c1 count (*) as ?c2 where {
select distinct ?s1 ?g {
?s1 a <https://medium.com/@sdmonroe/NewsArticle> .
quad map virtrdf:DefaultQuadMap {
graph ?g { ?s1 ?s1textp ?o1 . ?o1 bif:contains '"vios"' . }
}
}
}
group by ?s1 order by desc 2 limit 15 offset 0
When I remove the class constraint, items enter the result set that do not belong to the specified Named Graph:
define input:default-graph-uri <https://medium.com/@sdmonroe/vios-dev-content-monetization-8c2a05f4a987>
select ?s1 as ?c1 count (*) as ?c2 where {
select distinct ?s1 ?g {
quad map virtrdf:DefaultQuadMap {
graph ?g { ?s1 ?s1textp ?o1 . ?o1 bif:contains '"vios"' . }
}
}
}
group by ?s1 order by desc 2 limit 15 offset 0
Here is the same query with only the Named Graph changed. It returns the same list as the one above:
define input:default-graph-uri <https://medium.com/@sdmonroe/vios-reference-implementation-3153a3d589cf>
select ?s1 as ?c1 count (*) as ?c2 where {
select distinct ?s1 ?g {
quad map virtrdf:DefaultQuadMap {
graph ?g { ?s1 ?s1textp ?o1 . ?o1 bif:contains '"vios"' . }
}
}
}
group by ?s1 order by desc 2 limit 15 offset 0