|
From: Mike P. <mi...@sy...> - 2015-08-25 00:11:40
|
What is this triple pattern for?
?s ?someprop ?l .
Why not just formulate as:
SELECT ?s ?l WHERE {
{
?s <http://www.w3.org/2000/01/rdf-schema#label> ?l
} UNION {
?s <http://xmlns.com/foaf/0.1/name> ?l
} UNION {
?s <http://xmlns.com/foaf/0.1/Person> ?l
}
FILTER regex(?l, 'kill', 'i').
}
LIMIT 20
On Mon, Aug 24, 2015 at 2:47 PM, Joakim Soderberg <
joa...@bl...> wrote:
>
> If I execute the following SPARQL query:
>
> SELECT ?s ?l WHERE { ?s ?someprop ?l . { ?s <
> http://www.w3.org/2000/01/rdf-schema#label> ?l } . FILTER
> regex(?l,'kill', 'i'). } LIMIT 20
> I retreive the following expected result:
>
> Binding http://data.linkedmdb.org/resource/film/4115
> "Dressed to Kill”
>
> Binding http://data.linkedmdb.org/resource/film/77289
> "Killing Pablo"
>
> Binding http://data.linkedmdb.org/resource/film/928
> "The Killer”
>
> etc...
>
> But if I combine with UNION
>
> SELECT ?s ?l WHERE { ?s ?someprop ?l . { ?s <
> http://www.w3.org/2000/01/rdf-schema#label> ?l } UNION { ?s <
> http://xmlns.com/foaf/0.1/name> ?l } UNION { ?s <
> http://xmlns.com/foaf/0.1/Person> ?l } . FILTER regex(?l, 'kill', 'i'). }
> LIMIT 20
>
> I get the unexpected result:
>
> Bindin
> ghttp://musicbrainz.org/artist/00d992b5-d6d1-4130-971b-ab571593f94a#_
> Binding"'Sloppy' Henry"
>
> Binding
> http://musicbrainz.org/artist/025a2a2e-39f8-4bea-a175-2efbfb6016ec#_
> "#/Tau"
>
> Binding
> http://musicbrainz.org/artist/02bec9dc-18f4-46af-b18a-a156b8a0583c#_
> "'Ale'a"
>
> Binding
> http://musicbrainz.org/artist/03bef19b-535e-4b8a-a882-01fcb7324386#_
> [Alexandros]"
>
> Binding
> http://musicbrainz.org/artist/0bb8cd19-f05e-44c4-8955-4cc810de33d3#_
> "-Scaldis-"
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Bigdata-developers mailing list
> Big...@li...
> https://lists.sourceforge.net/lists/listinfo/bigdata-developers
>
>
|