1 forum post by user rohfle
Post: fts5: NOT only queries
(artifact: 737f8332d1 user: rohfle)
I have created an fts5 table for fun with denormalized data from a model with many relations in the hope to simplify search. This fts5 table has around 2000 rows and queries on this table work mostly the same to what I was doing before.
One of the use cases that doesn't work is queries that only subtract rows from the results. ie only phrases that only have
For simple queries, a user application workaround could be transformation of the query using DeMorgan's Theorem from
And then using a subquery like
This method requires an extra layer of complexity (user-side fts5 query parsing / rendering, recognition of only subtractive logic, ignoring groups)
If this were to be supported in fts5, it would be pointless to use rank, context and highlight for these queries, but it would be very useful for discovery by elimination on smallish datasets.
If anyone has ideas how to implement this in code, or any thoughts / side effects why it would be difficult or not a good idea, I would be interested in hearing them.
References to previous discussions