Hi - what version of Jena are you running?

    Andy

On 02/04/2025 13:30, Raitis Veinbahs wrote:
Good day Jena mailing list!

I'm using a query for looking up items in our system by RDF labels. It
works most of the time, but there is this weird behavior, namely, when
looking for a label "universal edition". If you search by pattern
"uni*", "univ*", or "univer*" it finds nothing, but if you search by
"universal*" it does.

In the local database I created another label called "unniversal
edition" (note the double "n"). After inserting this label, the search
for "unn*" yielded both labels while "uni*" still yielded nothing. I
inserted another "universal edition" with regular spelling, but it
still wasn't found with an "uni*" pattern.

Here's the query and the results:

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?resource ?label
WHERE {
?resource <http://jena.apache.org/text#query> (rdfs:label "unn*") ;
     rdfs:label ?label .
}

"resource","label"
"http://rdfh.ch/a/b","Universal Edition"
"http://rdfh.ch/a/b","unniversal Eedition"
"http://rdfh.ch/0806/xiy9FauqRQqVl_dsLWMYVQ","Universal Edition"
"http://rdfh.ch/0806/xiy9FauqRQqVl_dsLWMYVQ","unniversal edition"
"http://rdfh.ch/0806/xiy9FauqRQqVl_dsLWMYVQ","universal edition"
<<<

Here's the relevant part of config for the full text search:

:indexLucene            a
text:TextIndexLucene ;
                         text:directory
"/fuseki/lucene/repo_name" ;
                         text:entityMap                      :entMap ;
                         text:analyzer                       [ a
text:ConfigurableAnalyzer ;

text:tokenizer text:WhitespaceTokenizer ;

text:filters ( text:ASCIIFoldingFilter text:LowerCaseFilter)
                                                             ] .
<<<

I also tried to rebuild the index with java -cp
"${FUSEKI_HOME}/fuseki-server.jar" jena.textindexer
--desc="/path/to/config.ttl", but it didn't change the outcome. Should
it have?

Any tips or suggestions would be helpful.
Thank you!

Reply via email to