Skip to content
  • Sandro Knauß's avatar
    Fix 370385: Search for contacts with underscore. · 518578dc
    Sandro Knauß authored
    Currently we do word split by underscore. Th result is, that we
    cannot search for anything with a underscore. To fix this we
    need to add more words to the term list where also the term with
    underscore is added. I search in the history of baloo: This handmade
    term splitter was added to search for files with underscores (#336034).
    
    So we need either get control over the term splitting, while searching,
    or add the term with underscore to terms list. When we want to provide
    both (splitted and non-splitted) we also need to take care about the
    position parameter.
    
    Without patching xapiantermgenerator we can sill search for the complete
    email address on the commandline:
    
    ```
    cd /tmp/searchplugintest/contacts
    $ xapian-delve -t blue -d .
    Posting List for term 'blue' (termfreq 1, collfreq 1, wdf_max 1): 101 []
    $ xapian-delve -t jack_blue@test.com -d .
    Posting List for term 'jack_blue@test.com' (termfreq 1, collfreq 1,
    wdf_max 1): 101 []
    ```
    but NOT:
    
    ```
    $ xapian-delve -t jack_blue -d .
    term 'jack_blue' not in database
    ```
    
    FIXES: 370385
    FIXED-IN: 5.17.0
    518578dc