[libdazzle] fuzzy: more score calculation tweaks
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] fuzzy: more score calculation tweaks
- Date: Mon, 5 Jun 2017 07:44:23 +0000 (UTC)
commit 84ed563fba385db751bf44d606dc3d8405d2ad2f
Author: Christian Hergert <chergert redhat com>
Date: Mon Jun 5 00:44:14 2017 -0700
fuzzy: more score calculation tweaks
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 4154ca5..26fbe68 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 + ((0.9 / 255.0) * (1.0 / (strlen (match.key) + item->position)));
+ match.score = penalty + (.1 * (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 + ((0.9 / 255.0) * (1.0 / (strlen (match.key) + score)));
+ match.score = penalty + (.1 * (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]