[libdazzle] fuzzy: try to keep score under 1.0
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] fuzzy: try to keep score under 1.0
- Date: Mon, 5 Jun 2017 07:32:38 +0000 (UTC)
commit b583b8bb9111fb175f302d1b0a2390f08ac3f08a
Author: Christian Hergert <chergert redhat com>
Date: Mon Jun 5 00:31:01 2017 -0700
fuzzy: try to keep score under 1.0
src/fuzzy/dzl-fuzzy-index-cursor.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/fuzzy/dzl-fuzzy-index-cursor.c b/src/fuzzy/dzl-fuzzy-index-cursor.c
index 3d5852f..a8f926e 100644
--- a/src/fuzzy/dzl-fuzzy-index-cursor.c
+++ b/src/fuzzy/dzl-fuzzy-index-cursor.c
@@ -431,7 +431,7 @@ dzl_fuzzy_index_cursor_worker (GTask *task,
&match.priority))
continue;
- match.score = penalty + ((1.0 / 255.0) * (1.0 / (strlen (match.key) + item->position)));
+ match.score = penalty + ((0.9 / 255.0) * (1.0 / (strlen (match.key) + item->position)));
g_array_append_val (self->matches, match);
}
@@ -463,7 +463,7 @@ dzl_fuzzy_index_cursor_worker (GTask *task,
&match.priority))
continue;
- match.score = penalty + ((1.0 / 255.0) * (1.0 / (strlen (match.key) + score)));
+ match.score = penalty + ((0.9 / 255.0) * (1.0 / (strlen (match.key) + score)));
if (g_hash_table_lookup_extended (by_document,
GUINT_TO_POINTER (match.document_id),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]