[tracker/disable-fts: 5/10] tracker-search: When FTS disabled, don't use fts:match and don't check for stopwords
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/disable-fts: 5/10] tracker-search: When FTS disabled, don't use fts:match and don't check for stopwords
- Date: Thu, 24 Jun 2010 14:27:36 +0000 (UTC)
commit ee3c82b244c9a2b34769a2c4e508ede0f165d35d
Author: Aleksander Morgado <aleksander lanedo com>
Date: Tue Jun 15 12:42:52 2010 +0200
tracker-search: When FTS disabled, don't use fts:match and don't check for stopwords
src/tracker-utils/tracker-search.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-utils/tracker-search.c b/src/tracker-utils/tracker-search.c
index e29d092..d2de389 100644
--- a/src/tracker-utils/tracker-search.c
+++ b/src/tracker-utils/tracker-search.c
@@ -150,9 +150,11 @@ static gchar *
get_fts_string (GStrv search_words,
gboolean use_or_operator)
{
+#if HAVE_TRACKER_FTS
GString *fts;
gint i, len;
+
if (!search_words) {
return NULL;
}
@@ -181,6 +183,10 @@ get_fts_string (GStrv search_words,
}
return g_string_free (fts, FALSE);
+#else
+ /* If FTS support not enabled, always do non-fts searches */
+ return NULL;
+#endif
}
static void
@@ -1161,6 +1167,9 @@ main (int argc, char **argv)
g_thread_init (NULL);
}
+
+#if HAVE_TRACKER_FTS
+ /* Only check stopwords if FTS is enabled */
if (terms) {
TrackerLanguage *language;
gboolean stop_words_found;
@@ -1207,6 +1216,7 @@ main (int argc, char **argv)
g_object_unref (language);
}
+#endif
g_option_context_free (context);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]