Page MenuHomePhabricator

[native](web) Add message_search fts5 table
ClosedPublic

Authored by inka on Jul 8 2024, 7:15 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 8, 12:25 PM
Unknown Object (File)
Oct 14 2024, 3:16 PM
Unknown Object (File)
Oct 14 2024, 3:16 PM
Unknown Object (File)
Oct 14 2024, 3:15 PM
Unknown Object (File)
Sep 25 2024, 5:44 PM
Unknown Object (File)
Sep 8 2024, 3:57 PM
Unknown Object (File)
Sep 8 2024, 3:57 PM
Unknown Object (File)
Sep 8 2024, 3:57 PM
Subscribers

Details

Summary

issue: ENG-8640
By default all columns of fts5 table are indexed for fulltext search. We want to avoid doing this for original_message_id and message_id which represent message ids. That's why we mark them as UNINDEXED.
From docs:
"It is an error to add types, constraints or PRIMARY KEY declarations to a CREATE VIRTUAL TABLE statement used to create an FTS5 table. "

Test Plan

Tested that the migration and new db setup don't throw

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Jul 8 2024, 7:31 AM
Harbormaster failed remote builds in B30200: Diff 42112!

Add porter tokenizer, build wasm

native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
856 ↗(On Diff #42284)

We want to use the porter tokenizer to have messages be tokenized and stemmed using the porter algorithm. We use porter on the keyserver as well.
Please see the docs for more details

Harbormaster returned this revision to the author for changes because remote builds failed.Jul 15 2024, 4:50 AM
Harbormaster failed remote builds in B30323: Diff 42284!
inka requested review of this revision.Jul 15 2024, 8:08 AM
This revision is now accepted and ready to land.Jul 16 2024, 3:20 AM

Heads-up that I landed a different migration 48 in D12759, so you'll have to rebase this one. Sorry about that!

Heads-up that I landed a different migration 48 in D12759, so you'll have to rebase this one.

Thank you for letting me know!

Could you update the spacing to match the rest of the file?

native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
893 ↗(On Diff #42457)

We have table definitions at the top, and below we define indexes, could you move this above media_idx_container?

Could you update the spacing to match the rest of the file?

Please make sure to avoid tab characters! I noticed a bunch of them when I landed migration 48, so I spent some time fixing them up

native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
739–744 ↗(On Diff #42617)

Are you introducing tab characters or three spaces here? Let's do two spaces

904–909 ↗(On Diff #42617)

Are you introducing tab characters or three spaces here? Let's do two spaces

This revision was automatically updated to reflect the committed changes.