开发者

SQLite3, FTS3 and stop-words

How do you prevent SQLite3 from not indexing certain key words, or "stop-words", during the build of a virtual FTS3 table?

开发者_JAVA技巧

Examples I'd like to not index include "is", "the", "a" etc.


Unfortunately there is no built in tokenizer that handles stop words, so you will either need to implement your own tokenizer in C and filter out the stop words from the list manually, insert pre-tokenized/pre-filtered text into the relevant FTS table column or use a somewhat convoluted scheme where you insert the text into the FTS column, fetch it back after its been tokenized, filter it and then update the column value.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜