On 17/01/2019 15:45, Mikael Pesonen wrote:
On 17/01/2019 17:38, Andy Seaborne wrote:
On 17/01/2019 12:51, Mikael Pesonen wrote:
On 17/01/2019 13:58, Andy Seaborne wrote:
On 16/01/2019 12:50, Mikael Pesonen wrote:
Hi,
I'm trying to get text search work. Sparql REGEX takes few seconds
to finish so hoping this would be faster. Application is term
search using SKOS ontology.
First tested if it's enabled by default
?concept text:query (skos:prefLabel "medi") .
?concept skos:prefLabel ?prefLabel
That returns all concepts so I guess it's not enabled.
If it returns all concepts, the first line matched (otherwise you
get none). If so, there is a text index and "medi" (case
insensitive) matches Lucene rules, everything.
What does this mean then, why is it matching everything?
If zero matches, you don't get to ?concept skos:prefLabel ?prefLabel
(if the text index is correct)
The query above, if the index is setup correctly, gets all concepts
where any skos:prefLabel matches "medi" (not just at the start), then
gets all skos:prefLabel for those concepts. That does not mean
?prefLabel only matches "medi"
:c skos:prefLabel "medi" ;
skos:prefLabel "Other" .
will return 2 matches including ?prefLabel="Other"
Yes that is how I understood it. But ?concept text:query
(skos:prefLabel "medi") returns all concepts, also those that don't
have any label having "medi".
Then I don't understand what is going on.
Do you have a complete, minimal example that someone can use to recreate
the situation?
Andy