I'm looking at this query:
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX schema: <http://schema.org/>
PREFIX ex: <https://example.org/>
SELECT distinct ?person
WHERE {GRAPH ex:someGraph
{
?name <http://www.ontotext.com/plugins/autocomplete#query> "bar".
?person ex:hasSibling ?sibling.
?sibling ex:name ?name .
}
}
as I want this to fetch the IRI of a person, who's sibling's name is somehow highly related to "bar".
If I remove ?person ex:hasSibling ?sibling and ?sibling ex:name ?name triples, and change ?name to ?person this works fine - I am returned all IRI's that have some indexed property containing the string "bar". Is it possible to further specify the IRI using other SPARQL statements? If so, what am I doing wrong in my syntax?