Re: [sqlite] FTS3/FTS4 - Finding the term(s) that completes the input

2011-11-22 Thread Mohit Sindhwani
Hi Simon, Abhinav and Filip, On 21/11/2011 11:32 AM, Simon Slavin wrote: 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 di

Re: [sqlite] FTS3/FTS4 - Finding the term(s) that completes the input

2011-11-21 Thread Mohit Sindhwani
Hi Filip, On 21/11/2011 4:33 PM, Filip Navara wrote: On Mon, Nov 21, 2011 at 4:13 AM, 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

Re: [sqlite] FTS3/FTS4 - Finding the term(s) that completes the input

2011-11-21 Thread Filip Navara
On Mon, Nov 21, 2011 at 4:13 AM, Mohit Sindhwani wrote: > Hi Abhinav, > > > On 21/11/2011 2:52 AM, Abhinav Upadhyay wrote: > >> On Mon, Nov 21, 2011 at 12:17 AM, Mohit Sindhwani wrote: >> >>> What I'd like to be able to do is something like this: >>> >>> - let's say that the FTS4 table has value

Re: [sqlite] FTS3/FTS4 - Finding the term(s) that completes the input

2011-11-20 Thread Simon Slavin
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 li

Re: [sqlite] FTS3/FTS4 - Finding the term(s) that completes the input

2011-11-20 Thread Mohit Sindhwani
Hi Abhinav, On 21/11/2011 2:52 AM, Abhinav Upadhyay wrote: On Mon, Nov 21, 2011 at 12:17 AM, Mohit Sindhwani wrote: What I'd like to be able to do is something like this: - let's say that the FTS4 table has values such as: * mohit sindhwani, onghu * john doe, gmail * james ling, alibaba * john

Re: [sqlite] FTS3/FTS4 - Finding the term(s) that completes the input

2011-11-20 Thread Abhinav Upadhyay
On Mon, Nov 21, 2011 at 12:17 AM, Mohit Sindhwani wrote: > Hi, I'm finding my way through FTS3/FTS4 to replace some of the old code > that we have for searching terms within titles.  I now know that FTS3/4 > should be the way to proceed. > > So far, I have this: > - an FTS4 table that has two colu

[sqlite] FTS3/FTS4 - Finding the term(s) that completes the input

2011-11-20 Thread Mohit Sindhwani
Hi, I'm finding my way through FTS3/FTS4 to replace some of the old code that we have for searching terms within titles. I now know that FTS3/4 should be the way to proceed. So far, I have this: - an FTS4 table that has two columns: title (main column), ext (certain conditions to match) - an