On 21 Nov 2011, at 3:13am, Mohit Sindhwani wrote:

> I think my examples muddied the waters.  I have looked at Section 3 of the 
> FTS documents and that lets me bring back the "full result" that matches - 
> so, if I search for 'ling j', it can tell me that the result that matches is 
> 'james ling, alibaba'.  What it does not let me do is figure out that the 
> partly entered term "j" completes to the word 'james' - that is the part I'm 
> trying to figure out.

You have to look at the rows it returns and see how many of them there are.  If 
there's only one, that's your hit.  If there are more than one, see how many 
characters you can move along the row before they start to be different.  For 
instance suppose I have

Jones, Jenny
Smith, John
Smith, James
Zbignew, Andrew

Immediately they type 's', by looking at the two rows returned you can move all 
the way along to the 'j' before the strings are different.  The only efficient 
way to do it is programming.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to