diff --git a/mwmbl/tinysearchengine/rank.py b/mwmbl/tinysearchengine/rank.py index c3ee9e898d139d8643b5d61f71d359baa3594523..d1b204ad1e5142f0f2f29acaab6defca497da7da 100644 --- a/mwmbl/tinysearchengine/rank.py +++ b/mwmbl/tinysearchengine/rank.py @@ -50,7 +50,8 @@ def _score_result(terms, result: Document, is_complete: bool, max_score: float): total_possible_match_length = sum(len(x) for x in terms) match_score = (match_length + 1. / last_match_char) / (total_possible_match_length + 1) # score = 0.1 * domain_score + 0.9 - score = (0.01 + 0.99*match_score) * (0.01 + 0.99*(result.score / max_score)) + # score = (0.01 + 0.99*match_score) * (0.01 + 0.99*(result.score / max_score)) + score = 0.1 * match_score + 0.9 * (result.score / max_score) return score