You know, it would be possible to search for filter patterns of:

  (str(VAR) = STRING)
or
  (STRING = str(VAR))

and replace with the triples for this kind of extension. The worst that
could happen would be that the pattern would be missed due to other factors
in the query (such as constructing the string from other bindings), making
the query slower but still correct.

The the query analyzer know if there is a text index available?

Regards,
Paul Gearon



On Wed, Mar 26, 2014 at 11:50 AM, Rob Vesse <[email protected]> wrote:

> Yes, all full text extensions go beyond the SPARQL standard and will be
> implementation specific.
>
> Currently there is little/no interoperability between implementations so
> yes you limit portability of your queries if you use a text index
>
> Rob
>
> On 26/03/2014 14:56, "Olivier Rossel" <[email protected]> wrote:
>
> >Sounds good.
> >
> >But we are getting into implementation-specific functions. True?
> >(text:query is, I suppose, ARQ-specific).
> >
> >
> >
> >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