Question

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

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top