Improved search experience: Bug #720361

This introduces a new full-text search algorithm that attempts to
curb the effects of overstemming in the Porter Snowball stemmer.
The FTS table will be regenerated with this update.

The crux of this new algorithm is a configurable heuristic that
reduces stemmed matching.  The configuration is not available via the
UI (I suspect it will only confuse users) but can be changed by power
users via GSettings.  More information is available at:

https://wiki.gnome.org/Apps/Geary/FullTextSearchStrategy
This commit is contained in:
Jim Nelson 2014-12-16 12:21:09 -08:00
parent 068b3abcfc
commit 533ab75ee3
16 changed files with 742 additions and 156 deletions

View file

@ -22,3 +22,4 @@ install(FILES version-019.sql DESTINATION ${SQL_DEST})
install(FILES version-020.sql DESTINATION ${SQL_DEST})
install(FILES version-021.sql DESTINATION ${SQL_DEST})
install(FILES version-022.sql DESTINATION ${SQL_DEST})
install(FILES version-023.sql DESTINATION ${SQL_DEST})

21
sql/version-023.sql Normal file
View file

@ -0,0 +1,21 @@
--
-- Database upgrade to add FTS tokenize virtual table, which allows for querying the tokenizer
-- directly for stemmed words, and dropping the stemmed FTS table for an unstemmed one. We now
-- use the stemmer manually to generate search queries.
--
DROP TABLE MessageSearchTable;
CREATE VIRTUAL TABLE MessageSearchTable USING fts4(
body,
attachment,
subject,
from_field,
receivers,
cc,
bcc,
tokenize=simple,
prefix="2,4,6,8,10"
);