[libdazzle] fuzzy-mutable-index: penalize words by starting offset
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] fuzzy-mutable-index: penalize words by starting offset
- Date: Sun, 4 Jun 2017 03:03:47 +0000 (UTC)
commit dbd0c65edc9a885a250c4bd52a57e376ef7dd718
Author: Christian Hergert <chergert redhat com>
Date: Sat Jun 3 20:02:57 2017 -0700
fuzzy-mutable-index: penalize words by starting offset
This copies the design from DzlFuzzyIndex.
src/fuzzy/dzl-fuzzy-mutable-index.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/fuzzy/dzl-fuzzy-mutable-index.c b/src/fuzzy/dzl-fuzzy-mutable-index.c
index ac1eaf7..b6c6a2f 100644
--- a/src/fuzzy/dzl-fuzzy-mutable-index.c
+++ b/src/fuzzy/dzl-fuzzy-mutable-index.c
@@ -463,7 +463,7 @@ dzl_fuzzy_mutable_index_match (DzlFuzzyMutableIndex *fuzzy,
for (i = 0; i < root->len; i++)
{
item = &g_array_index (root, DzlFuzzyMutableIndexItem, i);
- dzl_fuzzy_mutable_index_do_match (&lookup, item, 1, 0);
+ dzl_fuzzy_mutable_index_do_match (&lookup, item, 1, MIN (16, item->pos * 4));
}
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]