[tracker] FTS: Re-enable TRACKER_FTS_STOP_WORDS envvar for unit tests



commit 572296626315bae00f4da7f01c556f4839181cf1
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Wed May 19 18:08:39 2010 +0200

    FTS: Re-enable TRACKER_FTS_STOP_WORDS envvar for unit tests

 src/libtracker-fts/tracker-fts.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-fts/tracker-fts.c b/src/libtracker-fts/tracker-fts.c
index 7e2fabf..437c5b1 100644
--- a/src/libtracker-fts/tracker-fts.c
+++ b/src/libtracker-fts/tracker-fts.c
@@ -3371,7 +3371,11 @@ static int constructVtab(
   min_len = tracker_fts_config_get_min_word_length (config);
   max_len = tracker_fts_config_get_max_word_length (config);
   v->ignore_numbers = tracker_fts_config_get_ignore_numbers (config);
-  v->ignore_stop_words = tracker_fts_config_get_ignore_stop_words (config);
+
+  /* disable stop words if TRACKER_FTS_STOP_WORDS is set to 0 - used by tests
+   *  otherwise, get value from the conf file */
+  v->ignore_stop_words = (g_strcmp0 (g_getenv ("TRACKER_FTS_STOP_WORDS"), "0") == 0 ?
+			  FALSE : tracker_fts_config_get_ignore_stop_words (config));
 
   v->max_words = tracker_fts_config_get_max_words_to_index (config);
   v->min_word_length = min_len;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]