From f1200fd1cab4fa57feacd43046997ce2d23edbd5 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 17 Sep 2012 12:54:28 +0200 Subject: [PATCH] Tweak rank/relevance algorithm Rank algorithm configurable by 'rank' element inside service. So far only, attribute 'cluster' is recognized. If cluster="yes", multiple records inside a cluster boosts higher than single records. This is default behavior and existing behavior. cluster="no" takes the average score of each record in a cluster. --- NEWS | 7 +++++++ doc/pazpar2_conf.xml | 16 ++++++++++++++++ src/client.c | 3 ++- src/pazpar2_config.c | 16 ++++++++++++++++ src/pazpar2_config.h | 1 + src/relevance.c | 29 +++++++++++++++++----------- src/relevance.h | 3 ++- test/test_facets_13.res | 2 +- test/test_facets_16.res | 2 +- test/test_facets_24.res | 14 +++++++------- test/test_facets_4.res | 10 +++++----- test/test_facets_9.res | 2 +- test/test_filter_12.res | 22 ++++++++++----------- test/test_filter_3.res | 22 ++++++++++----------- test/test_filter_6.res | 10 +++++----- test/test_filter_9.res | 10 +++++----- test/test_http.cfg | 1 + test/test_http_18.res | 2 +- test/test_http_28.res | 6 +++--- test/test_http_32.res | 2 +- test/test_http_36.res | 14 +++++++------- test/test_http_42.res | 10 +++++----- test/test_http_49.res | 2 +- test/test_http_5.res | 16 ++++++++-------- test/test_http_60.res | 2 +- test/test_http_63.res | 2 +- test/test_http_66.res | 2 +- test/test_http_72.res | 2 +- test/test_http_74.res | 2 +- test/test_http_76.res | 6 +++--- test/test_http_79.res | 4 ++-- test/test_http_81.res | 2 +- test/test_icu_9.res | 16 ++++++++-------- test/test_limit_limitmap_15.res | 2 +- test/test_limit_limitmap_18.res | 2 +- test/test_limit_limitmap_21.res | 2 +- test/test_limit_limitmap_24.res | 2 +- test/test_limit_limitmap_26.res | 6 +++--- test/test_limit_limitmap_28.res | 2 +- test/test_limit_limitmap_30.res | 6 +++--- test/test_limit_limitmap_36.res | 6 +++--- test/test_limit_limitmap_4.res | 16 ++++++++-------- test/test_limit_limitmap_42.res | 6 +++--- test/test_limit_limitmap_9.res | 40 +++++++++++++++++++-------------------- test/test_post_10.res | 16 ++++++++-------- test/test_post_8.res | 16 ++++++++-------- test/test_solr_13.res | 40 +++++++++++++++++++-------------------- test/test_solr_18.res | 40 +++++++++++++++++++-------------------- test/test_solr_22.res | 4 ++-- test/test_solr_25.res | 40 +++++++++++++++++++-------------------- test/test_solr_29.res | 4 ++-- test/test_solr_4.res | 40 +++++++++++++++++++-------------------- test/test_solr_9.res | 40 +++++++++++++++++++-------------------- test/test_termlist_block_9.res | 40 +++++++++++++++++++-------------------- test/test_turbomarcxml_4.res | 2 +- test/test_turbomarcxml_7.res | 2 +- test/test_url_3.res | 16 ++++++++-------- test/test_url_6.res | 4 ++-- 58 files changed, 352 insertions(+), 302 deletions(-) diff --git a/NEWS b/NEWS index 5cbf7a5..c513062 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,10 @@ + +Rank algorithm configurable by 'rank' element inside service. So far +only, attribute 'cluster' is recognized. If cluster="yes", multiple +records inside a cluster boosts higher than single records. This +is default behavior and existing behavior. cluster="no" takes the +average score of each record in a cluster. + --- 1.6.17 2012/09/05 Fix bad re-use of connections (connections with changing proxy should not diff --git a/doc/pazpar2_conf.xml b/doc/pazpar2_conf.xml index 913c753..454cc02 100644 --- a/doc/pazpar2_conf.xml +++ b/doc/pazpar2_conf.xml @@ -581,6 +581,22 @@ + + rank + + + Customizes the ranking (relevance) algorithm. + Attribute 'cluster' is a boolean + that controls whether Pazpar2 should boost ranking for merged + records. Is 'yes' by default. A value of 'no' will make + Pazpar2 avergage ranking of each record in a cluster. + + + This configuration was added in pazpar2 1.6.18. + + + +