[tracker] tracker-fts: Flush pending terms after updates
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker] tracker-fts: Flush pending terms after updates
- Date: Tue, 25 Aug 2009 09:04:17 +0000 (UTC)
commit 9760fe15c1b3b6602ca842945694513690b3a02b
Author: Jürg Billeter <j bitron ch>
Date: Tue Aug 25 10:55:49 2009 +0200
tracker-fts: Flush pending terms after updates
src/libtracker-data/tracker-data-update.c | 4 ++++
src/tracker-fts/tracker-fts.c | 5 +++++
src/tracker-fts/tracker-fts.h | 1 +
3 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index be3a6d1..8b42d30 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -430,6 +430,8 @@ tracker_data_update_buffer_flush (void)
}
}
+ tracker_fts_update_commit ();
+
g_hash_table_remove_all (update_buffer.tables);
g_free (update_buffer.subject);
update_buffer.subject = NULL;
@@ -939,6 +941,8 @@ tracker_data_delete_statement (const gchar *subject,
}
}
+ tracker_fts_update_commit ();
+
if (delete_callback) {
delete_callback (subject, predicate, object, types, delete_data);
}
diff --git a/src/tracker-fts/tracker-fts.c b/src/tracker-fts/tracker-fts.c
index fbc6ecd..615f5ed 100644
--- a/src/tracker-fts/tracker-fts.c
+++ b/src/tracker-fts/tracker-fts.c
@@ -7834,3 +7834,8 @@ int tracker_fts_update_text(int id, int column_id, const char *text){
return buildTerms(tracker_fts_vtab, id, text, column_id);
}
+void tracker_fts_update_commit(void){
+ fulltextSync((sqlite3_vtab *) tracker_fts_vtab);
+ fulltextCommit((sqlite3_vtab *) tracker_fts_vtab);
+}
+
diff --git a/src/tracker-fts/tracker-fts.h b/src/tracker-fts/tracker-fts.h
index fd6db21..fe82309 100644
--- a/src/tracker-fts/tracker-fts.h
+++ b/src/tracker-fts/tracker-fts.h
@@ -25,6 +25,7 @@ G_BEGIN_DECLS
int tracker_fts_init (sqlite3 *db);
int tracker_fts_update_init (int id);
int tracker_fts_update_text (int id, int column_id, const char *text);
+void tracker_fts_update_commit (void);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]