Re: [sqlite] FTS4 search for terms inside a word
On Jul 22, 2013, at 3:29 PM, Marco Bambiniwrote: > I have a virtual FTS4 table and I would like to search for some terms inside > a word, is that possible? Not with the default tokenizers, but perhaps you could write your own, say an ngram tokenizer or such. http://www.sqlite.org/fts3.html#section_8_1 http://en.wikipedia.org/wiki/N-gram ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] FTS4 search for terms inside a word
Marco Bambini wrote: > I have a virtual FTS4 table and I would like to search for some terms inside > a word, is that possible? No. > For example if a column contains "mysuperword mytestword" I would like to > find it using the subword: "super". > > While with the MATCH operator it does not find anything: > SELECT * FROM myTable WHERE myColumn MATCH '*super*'; The nearest you could do would be a phrase search. This would require that every single letter is made a word: INSERT INTO myTable(myColumn) VALUES('m y s u p e r w o r d m y t e s t w o r d'); SELECT * FROM myTable WHERE myColumn MATCH '"s u p e r"'; (This is not what the FTS index was designed and optimized for.) Regards, Clemens ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] FTS4 search for terms inside a word
Unfortunately FTS is only able to do prefix search, not sufix. -- View this message in context: http://sqlite.1065341.n5.nabble.com/FTS4-search-for-terms-inside-a-word-tp70196p70218.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] FTS4 search for terms inside a word
I have a virtual FTS4 table and I would like to search for some terms inside a word, is that possible? For example if a column contains "mysuperword mytestword" I would like to find it using the subword: "super". So with LIKE it worked but it is really slow: SELECT * FROM myTable WHERE myColumn LIKE '%super%'; While with the MATCH operator it does not find anything: SELECT * FROM myTable WHERE myColumn MATCH '*super*'; Any help? -- Marco Bambini http://www.sqlabs.com http://twitter.com/sqlabs http://instagram.com/sqlabs ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users