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".
Adding filter FILTER ( REGEX(?prefLabel, "\\bmedi", "i")) works as
expected.
Then copied Text Dataset Assembler from
https://jena.apache.org/documentation/query/text-query.html#configuration
into apache-jena-fuseki-3.9.0/run/configuration
With that fuseki start fails:
Jan 16 14:40:03 semantic-dev java[17961]: [2019-01-16 14:40:03]
WebAppContext WARN Failed startup of context
o.e.j.w.WebAppContext@4159e81b{Apache Jena Fuseki
Server,/,file:///home/text/tools/apache-jena-fuseki-3.9.0/webapp/,UNAVAILABLE}
Looks like it can't find the UI code.
Is file:///home/text/tools/apache-jena-fuseki-3.9.0 correct?
/home/text/tools/apache-jena-fuseki-3.9.0/webapp contains the default
install files:
-rw-r--r-- 1 fuseki 3485 Sep 28 20:15 admin-logs.html
drwxr-xr-x 2 fuseki 4096 Nov 26 11:32 css
-rw-r--r-- 1 fuseki 12441 Sep 28 20:15 dataset.html
-rw-r--r-- 1 fuseki 3756 Sep 28 20:15 documentation.html
drwxr-xr-x 2 fuseki 4096 Nov 26 11:32 fonts
drwxr-xr-x 2 fuseki 4096 Nov 26 11:32 images
-rw-r--r-- 1 fuseki 4283 Sep 28 20:15 index.html
drwxr-xr-x 4 fuseki 4096 Nov 26 11:32 js
-rw-r--r-- 1 fuseki 4434 Sep 28 20:15 manage.html
-rw-r--r-- 1 fuseki 3159 Sep 28 20:15 services.html
drwxr-xr-x 2 fuseki 4096 Nov 26 11:32 test
-rw-r--r-- 1 fuseki 7318 Sep 28 20:15 validate.html
drwxr-xr-x 2 fuseki 4096 Nov 26 11:32 WEB-INF
Jan 16 14:40:03 semantic-dev java[17961]: at
org.apache.jena.fuseki.build.FusekiConfig.readAssemblerFile(FusekiConfig.java:148)
Jan 16 14:40:03 semantic-dev java[17961]: at
org.apache.jena.fuseki.build.FusekiConfig.readConfigurationDirectory(FusekiConfig.java:178)
Jan 16 14:40:03 semantic-dev java[17961]: at
org.apache.jena.fuseki.webapp.FusekiSystem.initializeDataAccessPoints(FusekiSystem.java:226)
Jan 16 14:40:03 semantic-dev java[17961]: at
org.apache.jena.fuseki.webapp.FusekiServerListener.serverInitialization(FusekiServerListener.java:98)
Jan 16 14:40:03 semantic-dev java[17961]: at
org.apache.jena.fuseki.webapp.FusekiServerListener.contextInitialized(FusekiServerListener.java:56)
Jan 16 14:40:03 semantic-dev java[17961]: at
org.apache.jena.fuseki.cmd.JettyFuseki.start(JettyFuseki.java:138)
Jan 16 14:40:03 semantic-dev java[17961]: at
org.apache.jena.fuseki.cmd.FusekiCmd.runFuseki(FusekiCmd.java:372)
Jan 16 14:40:03 semantic-dev java[17961]: at
org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.exec(FusekiCmd.java:356)
Jan 16 14:40:03 semantic-dev java[17961]: at
org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.innerMain(FusekiCmd.java:104)
Jan 16 14:40:03 semantic-dev java[17961]: at
org.apache.jena.fuseki.cmd.FusekiCmd.main(FusekiCmd.java:67)
Otherwise all settings are default. Any tips what to try next?
--
Lingsoft - 30 years of Leading Language Management
www.lingsoft.fi
Speech Applications - Language Management - Translation - Reader's and Writer's
Tools - Text Tools - E-books and M-books
Mikael Pesonen
System Engineer
e-mail: mikael.peso...@lingsoft.fi
Tel. +358 2 279 3300
Time zone: GMT+2
Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND
Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND