• Mark Wagner's avatar
    search work · 8e5ee782
    Mark Wagner authored
    1.  introduce an FTS3 indexed table called "words"
    2.  put all sms messages into the words table (done in the SmsProvider's insert).
    3.  put all part messages which are plain text into the words table (done in the MmsProvider's insert).
    4.  put triggers on the delete and update for sms and part and update words appropriately.
    5.  remove the search recents code (mainly commented out) within the mms app.
    6.  implement a suggest provider which queries the words table for matches.
    7.  modify the search activity to use the words table rather than a LIKE clause.
    8.  modify the search activity to use a regular expression (rather than String.indexOf) for
        generating the snippet and highlighting the appropriate words within the snippet.  NOTE
        that originally I wanted to compute the matching words positions using the sql offsets
        function but it doesn't work within the slightly complicated query which is used for
        doing the search (two joins and a union, etc.)
    9.  modify the highlighting code within compose message activity to use regular expressions
        rather than indexof to do the highlighting.
    10. what else did I forget?
    8e5ee782
SmsProvider.java 27.5 KB