Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

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

like image 830
SK9 Avatar asked Apr 02 '26 17:04

SK9


1 Answers

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.

like image 187
Femi Avatar answered Apr 04 '26 13:04

Femi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!