From: Adam Dickmeiss Date: Thu, 12 Jun 2014 09:06:56 +0000 (+0200) Subject: Add pz:redis option X-Git-Tag: v1.7.0~5^2^2~1 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=ec408aa062279768cacf3810db429890cc1ce228;p=pazpar2-moved-to-github.git Add pz:redis option --- diff --git a/doc/pazpar2_conf.xml b/doc/pazpar2_conf.xml index eea4f75..4e82022 100644 --- a/doc/pazpar2_conf.xml +++ b/doc/pazpar2_conf.xml @@ -1325,6 +1325,23 @@ + pz:redis + + + If set and non-empty, + redis will + configured and enabled for the target. + The value of this setting is exactly as the redis option for + ZOOM C of YAZ. + + + This setting is honored in Pazpar2 1.6.43 or later. Pazpar2 must + be using YAZ version 5.2.0 or later. + + + + + pz:nativesyntax diff --git a/src/connection.c b/src/connection.c index 41e693c..402bfcc 100644 --- a/src/connection.c +++ b/src/connection.c @@ -421,6 +421,7 @@ static int connection_connect(struct connection *con, iochan_man_t iochan_man) struct session_database *sdb = client_get_database(con->client); const char *apdulog = session_setting_oneval(sdb, PZ_APDULOG); const char *memcached = session_setting_oneval(sdb, PZ_MEMCACHED); + const char *redis = session_setting_oneval(sdb, PZ_REDIS); assert(con); @@ -432,6 +433,8 @@ static int connection_connect(struct connection *con, iochan_man_t iochan_man) ZOOM_options_set(zoptions, "charset", charset); if (memcached && *memcached) ZOOM_options_set(zoptions, "memcached", memcached); + if (redis && *redis) + ZOOM_options_set(zoptions, "redis", redis); assert(host->ipport); if (host->proxy) diff --git a/src/settings.c b/src/settings.c index e8d6125..a17d094 100644 --- a/src/settings.c +++ b/src/settings.c @@ -85,6 +85,7 @@ static char *hard_settings[] = { "pz:authentication_mode", "pz:native_score", "pz:memcached", + "pz:redis", 0 }; diff --git a/src/settings.h b/src/settings.h index 3f306a0..de43d28 100644 --- a/src/settings.h +++ b/src/settings.h @@ -58,6 +58,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define PZ_AUTHENTICATION_MODE 35 #define PZ_NATIVE_SCORE 36 #define PZ_MEMCACHED 37 +#define PZ_REDIS 38 #define PZ_MAX_EOF 39 struct setting