[yunqa.de] Re: DiSqlite FTS: how to query using MATCH and rowid?

  • From: Delphi Inspiration <delphi@xxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Wed, 03 Mar 2010 12:09:02 +0100

At 06:06 03.03.2010, Edwin Yip wrote:

>With version 1.6.1 the FTS select statement does not return matching lines 
>when the search criteria contains column prefix, for example:
>
>select rowid from MyFTSTable where (MyFTSTable MATCH 'title:bbb') 

I recompiled the old DISQLite3 1.6.1 from version control and ran the following 
SQL:

drop table if exists myfts;
create virtual table myfts using fts3 (a, b);
insert into myfts values ('1 a1 a x', '1 b1 b x');
insert into myfts values ('2 a2 a x', '2 b2 b x');
insert into myfts values ('3 a3 a x', '3 b3 b x');

select rowid from myfts where myfts match 'a:a2';

It returns 2, as expected.

>But no problem if the criteria does not contain column prefixor executing the 
>SQL in the latest version of SqliteSpy.

The "column:" name prefix has been part of the FTS syntax since FTS1 and I do 
not recall that it has caused problems. Searching the SQLite timeline and 
mailing list did not reveal any issues, either.

>Are you sure this has been fixed in the latest version of DiSqlite3?

I am not sure it needed to be fixed. It has been part of the SQLite test suite 
since far before DISQLite3 1.6.1. My own DISQLite3 tests suite does not reveal 
any problems for either the old 1.6.1 or the current 2.2.0.

Maybe you want to post a full SQL script so I can reproduce your problem?

Ralf  

_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: