Siegfried Gevatter has proposed merging lp:~rainct/zeitgeist/ignore-ubuntuone-actor into lp:zeitgeist.
Requested reviews: Zeitgeist Framework Team (zeitgeist) For more details, see: https://code.launchpad.net/~rainct/zeitgeist/ignore-ubuntuone-actor/+merge/99986 <mhr3_> ok, so it seems we decided to skip the u1 events when indexing <mhr3_> (they can be uniquely identified by actor) -- https://code.launchpad.net/~rainct/zeitgeist/ignore-ubuntuone-actor/+merge/99986 Your team Zeitgeist Framework Team is requested to review the proposed merge of lp:~rainct/zeitgeist/ignore-ubuntuone-actor into lp:zeitgeist.
=== modified file 'extensions/fts++/indexer.cpp' --- extensions/fts++/indexer.cpp 2012-03-26 16:43:07 +0000 +++ extensions/fts++/indexer.cpp 2012-03-29 18:05:21 +0000 @@ -1303,6 +1303,14 @@ void Indexer::IndexEvent (ZeitgeistEvent *event) { + // Blacklist Ubuntu One events... + const gchar *actor; + actor = zeitgeist_event_get_actor (event); + if (strcmp(actor, "dbus://com.ubuntuone.SyncDaemon.service") == 0) + return; + if (strcmp(actor, "dbus://org.desktopcouch.CouchDB.service") == 0) + return; + try { const gchar *val; === modified file 'extensions/fts++/test/test-indexer.cpp' --- extensions/fts++/test/test-indexer.cpp 2012-03-20 12:25:59 +0000 +++ extensions/fts++/test/test-indexer.cpp 2012-03-29 18:05:21 +0000 @@ -1074,6 +1074,23 @@ assert_nth_result_has_id (results, 2, event_id6); } +static void +test_index_ignore_ubuntu_one (Fixture *fix, gconstpointer data) +{ + guint matches; + + // add test events to DBs + index_event (fix, create_test_event_simple ("ubuntuone:uuid", "failme")); + ZeitgeistEvent *event = create_test_event_simple ("file:///nice%20uri", "failme"); + zeitgeist_event_set_actor (event, "dbus://com.ubuntuone.SyncDaemon.service"); + index_event (fix, event); + + GPtrArray *results = search_simple (fix, "failme", NULL, + ZEITGEIST_RESULT_TYPE_MOST_RECENT_EVENTS, &matches); + + g_assert_cmpuint (results->len, ==, 0); +} + G_BEGIN_DECLS static void discard_message (const gchar *domain, @@ -1138,6 +1155,8 @@ g_test_add ("/Zeitgeist/FTS/Indexer/Query/MostPopularSubjects", Fixture, 0, setup, test_query_most_popular_subjects, teardown); */ + g_test_add ("/Zeitgeist/FTS/Indexer/Index/IgnoreUbuntuOne", Fixture, 0, + setup, test_index_ignore_ubuntu_one, teardown); // get rid of the "rebuilding index..." messages g_log_set_handler (NULL, G_LOG_LEVEL_MESSAGE, discard_message, NULL);
_______________________________________________ Mailing list: https://launchpad.net/~zeitgeist Post to : zeitgeist@lists.launchpad.net Unsubscribe : https://launchpad.net/~zeitgeist More help : https://help.launchpad.net/ListHelp