I just finished ( http://www.sqlite.org/cvstrac/chngview?cn=3893 )
checking in a string of changes to fts2.c to provide prefix search.
This works like:

 CREATE VIRTUAL TABLE t USING fts2(c);
 INSERT INTO t (c) VALUES ('This is a test');
 INSERT INTO t (c) VALUES ('That was a test');
 INSERT INTO t (c) VALUES ('A third phrase');
 SELECT snippet(t) FROM t WHERE t MATCH 'th*';
 -- <b>This</b> is a test
 -- <b>That</b> was a test
 -- A <b>third</b> phrase
 SELECT snippet(t) FROM t WHERE t MATCH '"a t*"';
 -- This is <b>a</b> <b>test</b>
 -- That was <b>a</b> <b>test</b>
 -- <b>A</b> <b>third</b> phrase

Please let me know of any bugs found.

The code should always be approximately as performant as the previous
code for non-prefix searches or for prefix searches matching a single
item.  As currently implemented, it is not as strong as I should like
on searches which match a large number of terms.

-scott

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to