Avoid substring matching: Tracker SPARQL Library Reference Manual

## Avoid substring matching

Matching for regexp/glob/substrings defeats any index text fields could have. For example:

    1
    2
    SELECT ?u { ?u nie:title ?title .
                FILTER (CONTAINS (?title, "sideshow")) }

Will traverse all title strings looking for the substring. It is encouraged to use fulltext search for finding matches within strings where possible, for example:

    1
    SELECT ?u { ?u fts:match "sideshow" }