[tracker/rss-enclosures] tracker-search: When FTS disabled, don't use fts:match and don't check for stopwords
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/rss-enclosures] tracker-search: When FTS disabled, don't use fts:match and don't check for stopwords
- Date: Sat, 26 Jun 2010 23:30:07 +0000 (UTC)
commit 99beb7731ee787ec10a0b88129d80ed252faf1ea
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]