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.
在构建虚拟 FTS3 表期间,如何防止 SQLite3 不索引某些关键字或“停用词”?
我不想索引的例子包括“is”、“the”、“a”等。
不幸的是,没有内置的分词器可以处理停用词,因此您需要在 C 中实现自己的分词器并手动从列表中过滤掉停用词,将预分词/预过滤的文本插入相关的 FTS 表列或者使用一个有点复杂的方案,将文本插入 FTS 列,在标记化后取回它,过滤它,然后更新列值。