Moving this here to keep track of the issue long-term.
Currently Prez API /search requests lack a wildcard flag in the Lucene full-text search query for full-text search in Fuseki. This will return no results for partial words - e.g. "bore" vs "borehole":
PREFIX text: <http://jena.apache.org/text#>
SELECT *
WHERE {
(?iri ?score) text:query "bore" .
} ORDER BY ?score
If the query was updated to include the wildcard flag:
PREFIX text: <http://jena.apache.org/text#>
SELECT *
WHERE {
(?iri ?score) text:query "bore*" .
} ORDER BY ?score
All results will contain a search score of 1.0.
In some cases searching by named graph (wrapping in GRAPH ?g {...}) can return meaningful scores with the wildcard, but not always. There are also Fuseki config options for text:TextIndexLucene, including selecting analyzers, but I haven't found a configuration that makes any difference.
We need to investigate how to get wildcards in Lucene working correctly and reliably and include it in Prez API, and other uses of Fuseki FTS across the board, to greatly improve the search experience.
Moving this here to keep track of the issue long-term.
Currently Prez API
/searchrequests lack a wildcard flag in the Lucene full-text search query for full-text search in Fuseki. This will return no results for partial words - e.g. "bore" vs "borehole":If the query was updated to include the wildcard flag:
All results will contain a search score of 1.0.
In some cases searching by named graph (wrapping in
GRAPH ?g {...}) can return meaningful scores with the wildcard, but not always. There are also Fuseki config options fortext:TextIndexLucene, including selecting analyzers, but I haven't found a configuration that makes any difference.We need to investigate how to get wildcards in Lucene working correctly and reliably and include it in Prez API, and other uses of Fuseki FTS across the board, to greatly improve the search experience.