On 26/03/14 14:56, Olivier Rossel wrote:
Sounds good.

But we are getting into implementation-specific functions. True?
(text:query is, I suppose, ARQ-specific).

Yes -- it's within SPARQL 1.1. syntax.

What is needed are additional indexes. Some system might have those built-in, accessed in some fashion but it's per-implementation.

There is no reason you couldn't convert the starting query into the second (optimization) but you are writing the query in the knowledge the indexes exist.

Lang tag handling isn't even part to of strict, minimal SPARQL - an argument where I didn't convince the WG to put work time on.

http://jena.staging.apache.org/documentation/query/text-query.html

        Andy




On Wed, Mar 26, 2014 at 1:05 PM, Andy Seaborne <[email protected]> wrote:

On 26/03/14 10:01, Olivier Rossel wrote:

Hello.

I have a question about matching strings in SPARQL, whatever the lang tag.
As far as I understand, the only way to do that is to let SPARQL bind a
   ?variable
and then FILTER for equality of its str() against my matching string
value.


In SPARQL 1.1, yes.


  For example:

SELECT ?person ?name
    WHERE
    {
    ?person foaf:name ?name .
    FILTER (str(?name) = "Jackie Chan") .
    }

Is it really the only way?
Won't it perform really bad?
Especially compared to the case where you know the lang tag:


SELECT ?person ?name
    WHERE
    {
    ?person foaf:name "Jackie Chan"@en
    }



This is what a text index is good for.  Get some limited possibilities and
test accurately in SPARQL:

(hurrily...)

?x text:query ('Jackie Chan') .
?x foaf:name ?name .

FILTER (str(?name) = "Jackie Chan") .

         Andy





Reply via email to