Skip to content
  • Carlos Garnacho's avatar
    libtracker-fts: Only let stop words go through on prefix queries · 7789e3ac
    Carlos Garnacho authored
    Commit 63e50786 made stop words go through when tokenizing FTS5 query
    search terms, in order to still provide matches for incompletely typed
    search terms that happen to match a stop word.
    
    This however brought the side effect that searching for a stop word in
    combination with other terms renders the latter ineffective. As the stop
    word has no tokens in the FTS5 table to match with, the whole query brings
    no results.
    
    Since that commit, SQLite fixed FTS5_TOKENIZE_PREFIX to work as advertised,
    so limit the bypass to prefix queries (e.g. "onto*"), since it only makes
    sense there. Also, invert the way we look for stop words (i.e. always lookup
    those in search terms as per config, and do the bypass once we know we deal
    with a stop word) for the sake of readability.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=787452
    7789e3ac