[tracker] FTS parser: delimit_words is always FALSE, so removing it
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] FTS parser: delimit_words is always FALSE, so removing it
- Date: Mon, 24 May 2010 17:06:04 +0000 (UTC)
commit 300662d6a7caef2cf8b4bda08ed3c2d3f62ec4ad
Author: Aleksander Morgado <aleksander lanedo com>
Date: Mon May 24 19:05:02 2010 +0200
FTS parser: delimit_words is always FALSE, so removing it
src/libtracker-fts/tracker-fts.c | 3 ---
src/libtracker-fts/tracker-parser-glib.c | 8 +-------
src/libtracker-fts/tracker-parser-libicu.c | 3 ---
src/libtracker-fts/tracker-parser-libunistring.c | 3 ---
src/libtracker-fts/tracker-parser.h | 1 -
tests/libtracker-fts/tracker-parser-test.c | 4 ----
tests/libtracker-fts/tracker-parser.c | 1 -
7 files changed, 1 insertions(+), 22 deletions(-)
---
diff --git a/src/libtracker-fts/tracker-fts.c b/src/libtracker-fts/tracker-fts.c
index 437c5b1..bc0b49c 100644
--- a/src/libtracker-fts/tracker-fts.c
+++ b/src/libtracker-fts/tracker-fts.c
@@ -3673,7 +3673,6 @@ static void snippetOffsetsOfColumn(
tracker_parser_reset (pVtab->parser,
zDoc,
nDoc,
- FALSE,
TRUE,
pVtab->ignore_stop_words,
TRUE,
@@ -4377,7 +4376,6 @@ static int tokenizeSegment(
tracker_parser_reset (parser,
pSegment,
nSegment,
- FALSE,
TRUE,
v->ignore_stop_words,
FALSE,
@@ -4837,7 +4835,6 @@ int Catid,
tracker_parser_reset (parser,
zText,
strlen (zText),
- FALSE,
TRUE,
v->ignore_stop_words,
TRUE,
diff --git a/src/libtracker-fts/tracker-parser-glib.c b/src/libtracker-fts/tracker-parser-glib.c
index 89a89b9..8af3550 100644
--- a/src/libtracker-fts/tracker-parser-glib.c
+++ b/src/libtracker-fts/tracker-parser-glib.c
@@ -75,7 +75,6 @@ struct TrackerParser {
gboolean ignore_stop_words;
guint max_words_to_index;
guint max_word_length;
- gboolean delimit_words;
gboolean ignore_reserved_words;
gboolean ignore_numbers;
@@ -268,10 +267,7 @@ parser_next (TrackerParser *parser,
c = g_utf8_get_char (p);
type = get_word_type (c);
- if (type == TRACKER_PARSER_WORD_IGNORE ||
- (parser->delimit_words &&
- (type == TRACKER_PARSER_WORD_HYPHEN ||
- type == TRACKER_PARSER_WORD_UNDERSCORE))) {
+ if (type == TRACKER_PARSER_WORD_IGNORE) {
if (!start) {
continue;
} else {
@@ -460,7 +456,6 @@ void
tracker_parser_reset (TrackerParser *parser,
const gchar *txt,
gint txt_size,
- gboolean delimit_words,
gboolean enable_stemmer,
gboolean ignore_stop_words,
gboolean ignore_reserved_words,
@@ -477,7 +472,6 @@ tracker_parser_reset (TrackerParser *parser,
parser->enable_stemmer = enable_stemmer;
parser->ignore_stop_words = ignore_stop_words;
- parser->delimit_words = delimit_words;
parser->txt_size = txt_size;
parser->txt = txt;
diff --git a/src/libtracker-fts/tracker-parser-libicu.c b/src/libtracker-fts/tracker-parser-libicu.c
index 17ab924..958c713 100644
--- a/src/libtracker-fts/tracker-parser-libicu.c
+++ b/src/libtracker-fts/tracker-parser-libicu.c
@@ -57,7 +57,6 @@ struct TrackerParser {
gboolean enable_stemmer;
guint max_words_to_index;
guint max_word_length;
- gboolean delimit_words;
gboolean ignore_stop_words;
gboolean ignore_reserved_words;
gboolean ignore_numbers;
@@ -319,7 +318,6 @@ void
tracker_parser_reset (TrackerParser *parser,
const gchar *txt,
gint txt_size,
- gboolean delimit_words,
gboolean enable_stemmer,
gboolean ignore_stop_words,
gboolean ignore_reserved_words,
@@ -335,7 +333,6 @@ tracker_parser_reset (TrackerParser *parser,
parser->enable_stemmer = enable_stemmer;
parser->ignore_stop_words = ignore_stop_words;
- parser->delimit_words = delimit_words;
parser->txt_size = txt_size;
parser->txt = txt;
diff --git a/src/libtracker-fts/tracker-parser-libunistring.c b/src/libtracker-fts/tracker-parser-libunistring.c
index de3f03d..16ac238 100644
--- a/src/libtracker-fts/tracker-parser-libunistring.c
+++ b/src/libtracker-fts/tracker-parser-libunistring.c
@@ -56,7 +56,6 @@ struct TrackerParser {
gboolean enable_stemmer;
guint max_words_to_index;
guint max_word_length;
- gboolean delimit_words;
gboolean ignore_stop_words;
gboolean ignore_reserved_words;
gboolean ignore_numbers;
@@ -278,7 +277,6 @@ void
tracker_parser_reset (TrackerParser *parser,
const gchar *txt,
gint txt_size,
- gboolean delimit_words,
gboolean enable_stemmer,
gboolean ignore_stop_words,
gboolean ignore_reserved_words,
@@ -289,7 +287,6 @@ tracker_parser_reset (TrackerParser *parser,
parser->enable_stemmer = enable_stemmer;
parser->ignore_stop_words = ignore_stop_words;
- parser->delimit_words = delimit_words;
parser->txt_size = txt_size;
parser->txt = txt;
diff --git a/src/libtracker-fts/tracker-parser.h b/src/libtracker-fts/tracker-parser.h
index f4065b9..21ab427 100644
--- a/src/libtracker-fts/tracker-parser.h
+++ b/src/libtracker-fts/tracker-parser.h
@@ -35,7 +35,6 @@ TrackerParser *tracker_parser_new (TrackerLanguage *language,
void tracker_parser_reset (TrackerParser *parser,
const gchar *txt,
gint txt_size,
- gboolean delimit_words,
gboolean enable_stemmer,
gboolean ignore_stop_words,
gboolean ignore_reserved_words,
diff --git a/tests/libtracker-fts/tracker-parser-test.c b/tests/libtracker-fts/tracker-parser-test.c
index 0364fdd..5a7d5a0 100644
--- a/tests/libtracker-fts/tracker-parser-test.c
+++ b/tests/libtracker-fts/tracker-parser-test.c
@@ -52,7 +52,6 @@ typedef struct {
/* Default parser configuration to use */
gint max_word_length;
- gboolean delimit_words;
gboolean enable_stemmer;
gboolean enable_stop_words;
gboolean skip_reserved_words;
@@ -75,7 +74,6 @@ test_common_setup (TrackerParserTestFixture *fixture,
/* Default conf parameters */
fixture->max_word_length = 50;
- fixture->delimit_words = TRUE;
fixture->enable_stemmer = TRUE;
fixture->enable_stop_words = TRUE;
fixture->skip_reserved_words = TRUE;
@@ -130,7 +128,6 @@ expected_nwords_check (TrackerParserTestFixture *fixture,
tracker_parser_reset (fixture->parser,
testdata->str,
strlen (testdata->str),
- fixture->delimit_words,
fixture->enable_stemmer,
fixture->enable_stop_words,
fixture->skip_reserved_words,
@@ -176,7 +173,6 @@ expected_word_check (TrackerParserTestFixture *fixture,
tracker_parser_reset (fixture->parser,
testdata->str,
strlen (testdata->str),
- fixture->delimit_words,
FALSE, /* no stemming for this test */
fixture->enable_stop_words,
fixture->skip_reserved_words,
diff --git a/tests/libtracker-fts/tracker-parser.c b/tests/libtracker-fts/tracker-parser.c
index 970c8cc..1c38215 100644
--- a/tests/libtracker-fts/tracker-parser.c
+++ b/tests/libtracker-fts/tracker-parser.c
@@ -149,7 +149,6 @@ run_parsing (void)
TRUE,
TRUE,
TRUE,
- TRUE,
TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]