[Mulgara-general] SPARQL filter not being applied.
Jim Irwin
jimirwin at acm.org
Tue Jun 23 19:35:58 UTC 2009
> Date: Mon, 22 Jun 2009 14:38:52 -0700
> From: Paul Gearon <gearon at ieee.org>
> Subject: Re: [Mulgara-general] SPARQL filter not being applied.
> To: Mulgara General <mulgara-general at mulgara.org>
>
> (snip)
> When the filters are reversed I was expecting it to filter by the
> ?rvxtmp_1 variable equaling "Gesture", and NOT by the ?instance
> variable being blank (meaning that only the second filter was being
> applied). Is that what happened? Perhaps your data is set up so that
> the domain of rbrnr:Object-Name is not likely to be blank? (meaning
> that your data is shaped such that this condition is inherent and
> needn't be filtered on)
Yes, that is what happened -- it filtered on ?rvxtmp_1 variable equaling
"Gesture". There were no cases where ?instance was blank, so I could
not confirm that only the second filter is being applied. The filters
are automatically generated by our query processing code, so it is not
easy to convert them to &&, nor do we know ahead of time whether the
isBLANK test is necessary or not, so it is always automatically added.
I suppose we could always wrap the str() function around any variable
which is compared to an untyped, non-numeric literal in our query
builder. It is a bit too much to expect our users to understand the
nuances of xsd:strings versus plain literals, and they certainly expect
to find "x"^^xsd:string if they search for "x" -- this was precisely the
complaint we received from the user who expected to see at least one
known result when he searched for "Gesture". I also doubt that our
users would object if we returned other datatypes having the same
lexical form, so doing more than inserting a str() function is probably
not necessary.
Jim
More information about the Mulgara-general
mailing list