diff --git a/src/gom-miner-main.c b/src/gom-miner-main.c
index d8e7447..02f914d 100644
--- a/src/gom-miner-main.c
+++ b/src/gom-miner-main.c
@@ -39,6 +39,7 @@ static const gchar introspection_xml[] =
   "<node>"
   "  <interface name='org.gnome.OnlineMiners.Miner'>"
   "    <method name='RefreshDB'>"
+  "      <arg name='index_types' type='as' direction='in'/>"
   "    </method>"
   "    <property name='DisplayName' type='s' access='read'/>"
   "  </interface>"
@@ -51,6 +52,11 @@ static guint name_owner_id = 0;
 static guint autoquit_id = 0;
 static gboolean refreshing = FALSE;
 static GomMiner *miner = NULL;
+static GVariantIter *iter_index_types = NULL;
+static gsize current_size = 0;
+
+static void
+handle_refresh_db (GDBusMethodInvocation *invocation);
 
 static gboolean
 autoquit_timeout_cb (gpointer _unused)
@@ -120,6 +126,8 @@ miner_refresh_db_ready_cb (GObject *source,
     }
   else
     {
+      if (current_size != 0)
+        handle_refresh_db (g_object_ref (invocation));
       g_dbus_method_invocation_return_value (invocation, NULL);
     }
 
@@ -129,6 +137,8 @@ miner_refresh_db_ready_cb (GObject *source,
 static void
 handle_refresh_db (GDBusMethodInvocation *invocation)
 {
+  static gchar *index_type;
+
   ensure_autoquit_off ();
 
   /* if we're refreshing already, compress with the current request */
@@ -138,8 +148,14 @@ handle_refresh_db (GDBusMethodInvocation *invocation)
   refreshing = TRUE;
   cancellable = g_cancellable_new ();
 
-  gom_miner_refresh_db_async (miner, cancellable,
-                              miner_refresh_db_ready_cb, g_object_ref (invocation));
+  if (g_variant_iter_loop (iter_index_types, "s", &index_type))
+    {
+      gom_miner_set_index_type (miner, index_type);
+      gom_miner_refresh_db_async (miner, cancellable,
+                                miner_refresh_db_ready_cb, g_object_ref (invocation));
+      index_type = NULL;
+      --current_size;
+    }
 }
 
 static void
@@ -153,7 +169,12 @@ handle_method_call (GDBusConnection       *connection,
                     gpointer               user_data)
 {
   if (g_strcmp0 (method_name, "RefreshDB") == 0)
-    handle_refresh_db (invocation);
+    {
+      iter_index_types = NULL;
+      g_variant_get (parameters, "(as)", &iter_index_types);
+      current_size = g_variant_iter_n_children (iter_index_types);
+      handle_refresh_db (invocation);
+    }
   else
     g_assert_not_reached ();
 }
diff --git a/src/gom-miner.c b/src/gom-miner.c
index b6b5504..538172c 100644
--- a/src/gom-miner.c
+++ b/src/gom-miner.c
@@ -42,6 +42,7 @@ struct _GomMinerPrivate {
   GList *pending_jobs;
 
   gchar *display_name;
+  gchar *index_type;
 };
 
 static void
@@ -742,3 +743,15 @@ gom_miner_refresh_db_finish (GomMiner *self,
 
   return TRUE;
 }
+
+void
+gom_miner_set_index_type (GomMiner *self, const gchar *index_type)
+{
+  self->priv->index_type = index_type;
+}
+
+const gchar *
+gom_miner_get_index_type (GomMiner *self)
+{
+  return self->priv->index_type;
+}
diff --git a/src/gom-miner.h b/src/gom-miner.h
index bce013e..996f2d0 100644
--- a/src/gom-miner.h
+++ b/src/gom-miner.h
@@ -108,6 +108,10 @@ gboolean gom_miner_refresh_db_finish (GomMiner *self,
                                       GAsyncResult *res,
                                       GError **error);
 
+void gom_miner_set_index_type (GomMiner *self, const gchar *index_type);
+
+const gchar * gom_miner_get_index_type (GomMiner *self);
+
 G_END_DECLS
 
 #endif /* __GOM_MINER_H__ */
