We have an interesting problem here that has me at my wit's end - so, I 
thought I'd ask for advice.

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).

Then, we want to be able to suggest what characters a user can type once 
he's already entered something - So, if he's already entered 'In', we'd 
like to suggest that he can only type 'D' (for India or Indonesia) or 
'T' for International.  Previously, we used substr because everything 
started from the start of the name being searched.  but, FTS now allows 
us to search from any word in the sentence.  I'm stuck trying to figure 
out an elegant way of supporting this.

This is further complicated by allowing the user to start from anywhere 
in the middle of a word...

Any suggestions?  I'm really stuck now!  Thanks :)

Best Regards,
Mohit.
6/8/2011 | 12:00 AM.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to