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:
parent
068b3abcfc
commit
533ab75ee3
16 changed files with 742 additions and 156 deletions
|
|
@ -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
21
sql/version-023.sql
Normal 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"
|
||||
);
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue