From: Adam Dickmeiss Date: Thu, 10 Dec 2009 11:55:29 +0000 (+0100) Subject: Change encoding mergekey fields X-Git-Tag: v1.2.4~4 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=c3834c9541d7896e59ef79222e499b1ba628ba2c;p=pazpar2-moved-to-github.git Change encoding mergekey fields Change encoding so harmonize with the "old" marc21.xsl mergekey scheme. That is field and value pairs separated by space and with no trailing space. --- diff --git a/src/logic.c b/src/logic.c index 57f36b4..1d34bee 100644 --- a/src/logic.c +++ b/src/logic.c @@ -897,15 +897,15 @@ static int get_mergekey_from_doc(xmlDoc *doc, xmlNode *root, const char *name, service->mergekey_pct, (const char *) value, 0); + if (wrbuf_len(norm_wr) > 0) + wrbuf_puts(norm_wr, " "); wrbuf_puts(norm_wr, name); - wrbuf_puts(norm_wr, "="); while ((norm_str = pp2_relevance_token_next(prt))) { if (*norm_str) { - if (wrbuf_len(norm_wr)) - wrbuf_puts(norm_wr, " "); + wrbuf_puts(norm_wr, " "); wrbuf_puts(norm_wr, norm_str); } }