On Sat, Jan 19, 2008 at 12:27 PM, Andy Goth <[EMAIL PROTECTED]> wrote: > SQLite version 3.5.4 > sqlite> create virtual table foo using fts3; > sqlite> insert into foo values('anything'); > sqlite> select * from foo where foo match '-all -words -are -negated'; > SQL error: SQL logic error or missing database > > Yeah, I know it's not really a useful thing to search for nothing but negated > words, but I think it should result in an empty list, not an SQL error. I > mean, the match words often come from a Web <form>, and I don't think I > should > have to write code to check for this situation.
Hmm. I think the current behaviour is because the obvious result for this query would be the set of all documents with the documents matching each of the negated terms removed. In the current system, calculating the set of all documents isn't convenient, so since this couldn't be supported, it's an error. I'm not sure that returning an empty set is the correct result, here. It occurs to me that this case could be handled by running a query for all docids in the %_content table, then filtering in the obvious way. I'll think about whether there are any nasty problems with that. -scott ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------