[tracker/fts4-fixes: 1/5] fts: Remove min word length limit from configuration
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/fts4-fixes: 1/5] fts: Remove min word length limit from configuration
- Date: Thu, 14 Feb 2013 17:37:15 +0000 (UTC)
commit e9836358c3ed331d56cc1d3dc5c4f10e634cf17f
Author: Carlos Garnacho <carlos lanedo com>
Date: Thu Feb 14 18:10:25 2013 +0100
fts: Remove min word length limit from configuration
It isn't used anymore, so remove the dangling setting.
.../org.freedesktop.Tracker.FTS.gschema.xml.in | 7 ----
src/libtracker-fts/tracker-fts-config.c | 37 --------------------
src/libtracker-fts/tracker-fts-config.h | 5 ---
3 files changed, 0 insertions(+), 49 deletions(-)
---
diff --git a/data/gschemas/org.freedesktop.Tracker.FTS.gschema.xml.in
b/data/gschemas/org.freedesktop.Tracker.FTS.gschema.xml.in
index c70f12b..b487aed 100644
--- a/data/gschemas/org.freedesktop.Tracker.FTS.gschema.xml.in
+++ b/data/gschemas/org.freedesktop.Tracker.FTS.gschema.xml.in
@@ -20,13 +20,6 @@ Boston, MA 02110-1301, USA.
<schemalist>
<schema id="org.freedesktop.Tracker.FTS" path="/org/freedesktop/tracker/fts/">
- <key name="min-word-length" type="i">
- <default>3</default>
- <range min="0" max="30"/>
- <_summary>Minimum length of a word to be indexed</_summary>
- <_description>Words with less characters than this will be ignored by the indexer.</_description>
- </key>
-
<key name="max-word-length" type="i">
<default>30</default>
<range min="0" max="200"/>
diff --git a/src/libtracker-fts/tracker-fts-config.c b/src/libtracker-fts/tracker-fts-config.c
index adce3d3..1fc9f32 100644
--- a/src/libtracker-fts/tracker-fts-config.c
+++ b/src/libtracker-fts/tracker-fts-config.c
@@ -33,7 +33,6 @@
#define GROUP_INDEXING "Indexing"
/* Default values */
-#define DEFAULT_MIN_WORD_LENGTH 3 /* 0->30 */
#define DEFAULT_MAX_WORD_LENGTH 30 /* 0->200 */
#define DEFAULT_MAX_WORDS_TO_INDEX 10000
#define DEFAULT_IGNORE_NUMBERS TRUE
@@ -56,7 +55,6 @@ enum {
PROP_0,
/* Indexing */
- PROP_MIN_WORD_LENGTH,
PROP_MAX_WORD_LENGTH,
PROP_ENABLE_STEMMER,
PROP_ENABLE_UNACCENT,
@@ -68,7 +66,6 @@ enum {
};
static TrackerConfigMigrationEntry migration[] = {
- { G_TYPE_INT, GROUP_INDEXING, "MinWordLength", "min-word-length" },
{ G_TYPE_INT, GROUP_INDEXING, "MaxWordLength", "max-word-length" },
{ G_TYPE_BOOLEAN, GROUP_INDEXING, "EnableStemmer" , "enable-stemmer" },
{ G_TYPE_BOOLEAN, GROUP_INDEXING, "EnableUnaccent", "enable-unaccent" },
@@ -91,15 +88,6 @@ tracker_fts_config_class_init (TrackerFTSConfigClass *klass)
/* Indexing */
g_object_class_install_property (object_class,
- PROP_MIN_WORD_LENGTH,
- g_param_spec_int ("min-word-length",
- "Minimum word length",
- " Set the minimum length of words to index (0->30,
default=3)",
- 0,
- 30,
- DEFAULT_MIN_WORD_LENGTH,
- G_PARAM_READWRITE));
- g_object_class_install_property (object_class,
PROP_MAX_WORD_LENGTH,
g_param_spec_int ("max-word-length",
"Maximum word length",
@@ -161,10 +149,6 @@ config_set_property (GObject *object,
{
switch (param_id) {
/* Indexing */
- case PROP_MIN_WORD_LENGTH:
- tracker_fts_config_set_min_word_length (TRACKER_FTS_CONFIG (object),
- g_value_get_int (value));
- break;
case PROP_MAX_WORD_LENGTH:
tracker_fts_config_set_max_word_length (TRACKER_FTS_CONFIG (object),
g_value_get_int (value));
@@ -206,9 +190,6 @@ config_get_property (GObject *object,
switch (param_id) {
/* Indexing */
- case PROP_MIN_WORD_LENGTH:
- g_value_set_int (value, tracker_fts_config_get_min_word_length (config));
- break;
case PROP_MAX_WORD_LENGTH:
g_value_set_int (value, tracker_fts_config_get_max_word_length (config));
break;
@@ -281,14 +262,6 @@ tracker_fts_config_save (TrackerFTSConfig *config)
}
gint
-tracker_fts_config_get_min_word_length (TrackerFTSConfig *config)
-{
- g_return_val_if_fail (TRACKER_IS_FTS_CONFIG (config), DEFAULT_MIN_WORD_LENGTH);
-
- return g_settings_get_int (G_SETTINGS (config), "min-word-length");
-}
-
-gint
tracker_fts_config_get_max_word_length (TrackerFTSConfig *config)
{
g_return_val_if_fail (TRACKER_IS_FTS_CONFIG (config), DEFAULT_MAX_WORD_LENGTH);
@@ -337,16 +310,6 @@ tracker_fts_config_get_max_words_to_index (TrackerFTSConfig *config)
}
void
-tracker_fts_config_set_min_word_length (TrackerFTSConfig *config,
- gint value)
-{
- g_return_if_fail (TRACKER_IS_FTS_CONFIG (config));
-
- g_settings_set_int (G_SETTINGS (config), "min-word-length", value);
- g_object_notify (G_OBJECT (config), "min-word-length");
-}
-
-void
tracker_fts_config_set_max_word_length (TrackerFTSConfig *config,
gint value)
{
diff --git a/src/libtracker-fts/tracker-fts-config.h b/src/libtracker-fts/tracker-fts-config.h
index a3e4a86..020663c 100644
--- a/src/libtracker-fts/tracker-fts-config.h
+++ b/src/libtracker-fts/tracker-fts-config.h
@@ -48,17 +48,12 @@ GType tracker_fts_config_get_type (void) G_GNUC_CONST;
TrackerFTSConfig *tracker_fts_config_new (void);
gboolean tracker_fts_config_save (TrackerFTSConfig *config);
-gint tracker_fts_config_get_min_word_length (TrackerFTSConfig *config);
gint tracker_fts_config_get_max_word_length (TrackerFTSConfig *config);
gboolean tracker_fts_config_get_enable_stemmer (TrackerFTSConfig *config);
gboolean tracker_fts_config_get_enable_unaccent (TrackerFTSConfig *config);
gboolean tracker_fts_config_get_ignore_numbers (TrackerFTSConfig *config);
gboolean tracker_fts_config_get_ignore_stop_words (TrackerFTSConfig *config);
gint tracker_fts_config_get_max_words_to_index (TrackerFTSConfig *config);
-void tracker_fts_config_set_min_word_length (TrackerFTSConfig *config,
- gint value);
-void tracker_fts_config_set_max_word_length (TrackerFTSConfig *config,
- gint value);
void tracker_fts_config_set_enable_stemmer (TrackerFTSConfig *config,
gboolean value);
void tracker_fts_config_set_enable_unaccent (TrackerFTSConfig *config,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]