Skip to content

Fuseki FTS partial word support #469

Description

@jamiefeiss

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.

Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions