On Thu, Aug 5, 2010 at 12:42 PM, Sam Roberts <vieuxt...@gmail.com> wrote: > FTS3 only searches full terms/words by default, but I think if I built a > custom > tokenizer that returned all the suffix trees for a name:
FTS3 can do prefix searches, MATCH 'a*'. Also, it aimed to support multiple hits at the same position, for stemming purposes. So you might be able to get away with making a copy of fts3_tokenizer1.c, and modifying it to keep an additional flag in the cursor to let you return each token twice (once reversed). I can't offhand think of how to distinguish the resulting prefix matches from suffix matches. Maybe you can work that out yourself by using the rows returned to figure it out. Also note that this will possibly interact poorly with the snippeting and offset functions. As a short-term proof-of-concept hack, you could just have two tables. Insert your originals into one table, then take last_insert_rowid() and insert the document reversed into the other table. -scott _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users