write_search_node_to_sql() has a comment about wrapping the SQLite for every multi-term search node in parentheses to generate the correct conditions:
|
// NOTE: when adding any new nodes in the future, make sure that they are either |
|
// a single search term, or they wrap multiple terms in parentheses, as can |
|
// be seen in the sql() unit test at the bottom of the file. |
It's easy to miss that though and introduce bugs as happened recently (#5500) and in the past when the API was introduced (#1754 (comment)) so it's worth looking into improving this.
write_search_node_to_sql() has a comment about wrapping the SQLite for every multi-term search node in parentheses to generate the correct conditions:
anki/rslib/src/search/sqlwriter.rs
Lines 127 to 129 in d80273e
It's easy to miss that though and introduce bugs as happened recently (#5500) and in the past when the API was introduced (#1754 (comment)) so it's worth looking into improving this.