In Attachment is an test REDF with 4 Instances.
I submit following Sparql Query
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX ns1: <http://ns.vakantieland.nl/0.2#>
SELECT DISTINCT ?poi WHERE
{
{ ?poi dc:title ?objecta1 FILTER (regex(str(?objecta1), 'a', 'i')) . ?poi ns1:isPOI 'true' }
UNION
{ ?poi dc:description ?objectb1 FILTER (regex(str(?objectb1), 'a', 'i')) . ?poi ns1:isPOI 'true' }
.
{ ?poi dc:title ?objecta2 FILTER (regex(str(?objecta2), 'b', 'i')) . ?poi ns1:isPOI 'true' }
UNION
{ ?poi dc:description ?objectb2 FILTER (regex(str(?objectb2), 'b', 'i')) . ?poi ns1:isPOI 'true' }
}
Or in Short:
(A UNION B) INTERSECT (C UNION D)
I will have a resultset with instances containing an ("a" in title (A) OR description (B)) AND ("b" in title (C) OR description (D))
This means I will get from Test RDF:
-> Instance with string containing in title: a and description : b . In TestRDF there is only one wich matches to the Where Clause
<http://ns.vakantieland.nl/0.2#TestInstance_a_b>
I Testet it with Joseki and it works.
But with the Sparql Engine from RAP I get an Resultset with 3 Instances:
1. http://ns.vakantieland.nl/0.2#TestInstance_a_c2
2. http://ns.vakantieland.nl/0.2#TestInstance_a_c1
3. http://ns.vakantieland.nl/0.2#TestInstance_a_b
Test RDF