summaryrefslogtreecommitdiff
path: root/src/libtracker-common
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2023-01-22 14:47:06 +0100
committerCarlos Garnacho <carlosg@gnome.org>2023-01-23 15:50:06 +0100
commit3b0fd169216c7a18e5dfa65d9ba340f3e38f880b (patch)
treec5df75ea3013c4d7c8d73381c096ccfabb74ebb9 /src/libtracker-common
parentcfc4f6a89ba5e07c7bd8e3d836f43bf17b32b68f (diff)
downloadtracker-3b0fd169216c7a18e5dfa65d9ba340f3e38f880b.tar.gz
core: Fix possible FTS integrity corruption
From experimenting with FTS5, our usage patterns, and the 'integrity-check' FTS command, it turns out the 'delete' command does not entirely like doing partial updates on a row, it instead expects the command to be issued for all table columns. The only way to keep the FTS index happy is that we issue FTS deletes/inserts for all columns in the FTS table whenever we update a rowid, and that the select query on the external table "fts_view" is as-is for the given rowid. For that we must move the COALESCE() that filters out rows with all-empty text columns from the FTS updating queries to the fts_view view itself. In order to automatically fix possible corruptions in existing databases, and update to the fts_view change, we must trigger all our sorts of FTS updates: A pointless FTS field (nco:phoneNumber) was removed to trigger an update on the fts view+table, and the parser version was bumped to ensure the FTS index is rebuilt. These modifications will update existing databases to fix any existing corruption. Closes: https://gitlab.gnome.org/GNOME/tracker-miners/-/issues/253
Diffstat (limited to 'src/libtracker-common')
-rw-r--r--src/libtracker-common/tracker-parser.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libtracker-common/tracker-parser.h b/src/libtracker-common/tracker-parser.h
index 7e1708b81..3c8271503 100644
--- a/src/libtracker-common/tracker-parser.h
+++ b/src/libtracker-common/tracker-parser.h
@@ -30,7 +30,7 @@
* at runtime, the former must be rebuilt for those to match perfectly
* to avoid returning meaningless results on FTS searches.
*/
-#define TRACKER_PARSER_VERSION 4
+#define TRACKER_PARSER_VERSION 5
G_BEGIN_DECLS