[tracker/wip/carlosg/domain-ontologies: 36/124] libtracker-fts: Remove TRACKER_FTS_STOP_WORDS envvar



commit c1c10355ff5a2fb8761c7289a7828678c7ff13ff
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Jun 4 17:32:25 2017 +0200

    libtracker-fts: Remove TRACKER_FTS_STOP_WORDS envvar
    
    If we have to keep one for tests, let it be
    TRACKER_LANGUAGE_STOP_WORDS_DIR, and point to a dummy location
    in the fts tests.

 src/libtracker-fts/tracker-fts-tokenizer.c |    6 +-----
 tests/libtracker-fts/tracker-fts-test.c    |    2 +-
 2 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/libtracker-fts/tracker-fts-tokenizer.c b/src/libtracker-fts/tracker-fts-tokenizer.c
index f8a0728..474ab76 100644
--- a/src/libtracker-fts/tracker-fts-tokenizer.c
+++ b/src/libtracker-fts/tracker-fts-tokenizer.c
@@ -162,11 +162,7 @@ tracker_tokenizer_data_new (void)
        p->enable_unaccent = tracker_fts_config_get_enable_unaccent (config);
        p->ignore_numbers = tracker_fts_config_get_ignore_numbers (config);
        p->max_words = tracker_fts_config_get_max_words_to_index (config);
-
-       /* disable stop words if TRACKER_FTS_STOP_WORDS is set to 0 - used by tests
-        *  otherwise, get value from the conf file */
-       p->ignore_stop_words = (g_strcmp0 (g_getenv ("TRACKER_FTS_STOP_WORDS"), "0") == 0 ?
-                               FALSE : tracker_fts_config_get_ignore_stop_words (config));
+       p->ignore_stop_words = tracker_fts_config_get_ignore_stop_words (config);
 
        g_object_unref (config);
 
diff --git a/tests/libtracker-fts/tracker-fts-test.c b/tests/libtracker-fts/tracker-fts-test.c
index 729ddff..c208058 100644
--- a/tests/libtracker-fts/tracker-fts-test.c
+++ b/tests/libtracker-fts/tracker-fts-test.c
@@ -185,7 +185,7 @@ main (int argc, char **argv)
        datadir = g_build_filename (current_dir, "tracker", NULL);
        g_free (current_dir);
 
-       g_setenv ("TRACKER_FTS_STOP_WORDS", "0", TRUE);
+       g_setenv ("TRACKER_LANGUAGE_STOP_WORDS_DIR", current_dir, TRUE);
 
        /* add test cases */
        for (i = 0; tests[i].test_name; i++) {


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