BUG(?) in FTS5

mailing lists <mailinglists-/[email protected]>
Newsgroups gmane.comp.db.sqlite.general
Message-ID <[email protected]>
Hi,

create and fill the tables:

CREATE TABLE Games (ID INTEGER PRIMARY KEY, WhiteID INTEGER, BlackID INTEGER);
CREATE VIRTUAL TABLE PlayersFTS USING FTS5 (LastName,FirstNames);

INSERT INTO Games (WhiteID,BlackID) VALUES(1,2);
INSERT INTO PlayersFTS (rowid,LastName,FirstNames) VALUES(1,'A','1');
INSERT INTO PlayersFTS (rowid,LastName,FirstNames) VALUES(2,'B','2');

The following SELECT statement fails with the error "unable to use function MATCH in the requested context":

SELECT Games.* FROM Games,PlayersFTS WHERE ((PlayersFTS.rowid=Games.BlackID)OR(PlayersFTS.rowid=Games.WhiteID))AND(PlayersFTS MATCH 'LastName:A');

This SELECT statement works:

SELECT Games.* FROM Games,PlayersFTS WHERE (PlayersFTS.rowid IN(Games.BlackID,Games.WhiteID))AND(PlayersFTS MATCH 'LastName:A');

Regards,
Hartwig

_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.