Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试搜索 2 个单独的列keyword并keyword2进行匹配。这可以用 SQLite FTS 完成吗?
keyword
keyword2
我试过这个说法,但没有奏效:
String sql = "Select * from tblvHAL2001 WHERE tblvHAL2001 MATCH 'keyword:" + question + "' OR MATCH 'keyword2:" + question +"'";
每个表应该只使用一个 FTS 查询。FTS 确实有布尔运算符:
... WHERE tblvHAL2001 MATCH 'keyword: "blah" OR keyword2: "blah"'
而在 FTS5 中,单列过滤器可以指定多列:
... WHERE tblvHAL2001 MATCH '{keyword keyword2}: "blah"'
WHERE tblvHAL2001 MATCH '{keyword keyword2}: "blah"'