[tracker/disable-fts: 5/10] tracker-search: When FTS disabled, don't use fts:match and don't check for stopwords
- From: Aleksander Morgado <aleksm 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: Tue, 15 Jun 2010 12:42:31 +0000 (UTC)
commit cb0928660b3993b7fcaf488c85a2b123c6f8a333
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 947f209..260f76e 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;
}
@@ -173,6 +175,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
@@ -1153,6 +1159,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;
@@ -1199,6 +1208,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]