2011/8/5 Mohit Sindhwani <m...@onghu.com>:
> We have a list of words that we want to quickly search.  We used FTS3
> for it and it is fast and works very well.  The only problem is that it
> breaks the original entry at word boundaries (spaces, punctuation,
> etc.).  We would like to allow a person to search starting within a
> word.  So, we want to do something that gives FTS like speed for queries
> like "LIKE '%s%'
>
> What would you recommend?  We've tried a few things, none of them
> elegant.. yet!  The original table has around 650,000 names (2 - 5 words
> per name).
> Best Regards,
> Mohit.

I tried to use the Tokyo Cabinet (btree) with very good results. I
created a custom index of substrings

substring(string, 1)||' '||id .. substring(string, length)||' '||id

Time to search in 1M records (16M records in the index) is in ms.
-- 
Kit
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to