From 38c003bf3d3a5a239d46afc52f8e21fc597149d6 Mon Sep 17 00:00:00 2001 From: asciimoo Date: Sat, 19 Oct 2013 19:04:46 +0200 Subject: [PATCH] [enh] custom engine result weights --- searx/engines/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py index 0b56d5f0a..dcdcbb093 100644 --- a/searx/engines/__init__.py +++ b/searx/engines/__init__.py @@ -92,7 +92,7 @@ def search(query, request, selected_engines): # deduplication + scoring for i,res in enumerate(flat_res): res['parsed_url'] = urlparse(res['url']) - score = flat_len - i + score = (flat_len - i)*settings.weights.get(res['engine'], 1) duplicated = False for new_res in results: if res['parsed_url'].netloc == new_res['parsed_url'].netloc and\