Reputation: 87
Is there a way to match without case sensitivity in GraphDB? The test dataset is pretty small. Around 8m triples.
SELECT ?s ?name
WHERE {
?s <http://www.sample.org.uk/data/schema/simplename/name> ?name.
?s <http://www.sample.org.uk/data/schema/provider> "nhle".
OPTIONAL {?s <http://www.sample.org.uk/data/schema/county/> "Essex"}
OPTIONAL {?s <http://www.sample.org.uk/data/schema/district/> "Epping Forest"}
OPTIONAL {?s <http://www.sample.org.uk/data/schema/parish/> "Buckhurst Hill"}
}
I can, of course, use FILTER - but it takes a good seven seconds to return which is too slow.
SELECT ?s ?name ?county ?district ?parish
WHERE {
?s <http://www.sample.org.uk/data/schema/simplename/name> ?name.
?s <http://www.sample.org.uk/data/schema/provider> "nhle".
OPTIONAL {?s <http://www.sample.org.uk/data/schema/county/> ?county}
OPTIONAL {?s <http://www.sample.org.uk/data/schema/district/> ?district}
OPTIONAL {?s <http://www.sample.org.uk/data/schema/parish/> ?parish}
FILTER (lcase(?county)='essex'
&& lcase(?district)='epping forest'
&& lcase(?parish)='buckhurst hill'
)
}
Upvotes: 0
Views: 88
Reputation: 106
This may not be a direct answer to your question, sorry for that (I cannot make a comment).
Since you already know you want to match against the county of Essex, as apposed to anything with the label "essex" or "Essex", it might be better to use the URI for that county, instead of a label. The URI could for instance be:
<http://www.wikidata.org/entity/Q23240>
At least this will prevent you from accidentally matching something completely different with the label "Essex", p.e. the Essex whale ship (Wikipedia link)
Ofcourse I'm not aware of what your data looks like, so this may be of no use to you. Still worth pointing out hopefully.
Upvotes: 1