Fix bi-18 sparql query
@@ -15,24 +15,20 @@ WHERE
SELECT ?person (COUNT(?message) AS ?messageCount)
WHERE
{
- BIND (100 AS ?lengthTreshold)
VALUES (?language) {$languages}
-
- {
+ ?person a snvoc:Person
+ OPTIONAL {
?message a snvoc:Comment .
- ?message snvoc:replyOf+ ?post .
+ ?message snvoc:replyOf* ?post .
?message snvoc:creationDate ?creationDate .
FILTER (?creationDate > $date) .
?post a snvoc:Post .
?post snvoc:language ?language .
- } UNION {
- ?message a snvoc:Post .
- ?message snvoc:language ?language .
- } .
?message snvoc:content ?content .
- FILTER(STRLEN(?content) > 0 && STRLEN(?content) < ?lengthTreshold)
+ ?message snvoc:length ?length .
+ FILTER(STRLEN(?content) > 0 && ?length < $lengthThreshold)
?message snvoc:hasCreator ?person .
- ?person a snvoc:Person
+ }
}
GROUP BY ?person
}
