From: Heikki Levanto Date: Mon, 27 Jul 2015 09:21:12 +0000 (+0200) Subject: Fix PAZ-10108: Position recids with leading zeroes X-Git-Tag: v1.11.3~5 X-Git-Url: http://git.indexdata.com/?p=pazpar2-moved-to-github.git;a=commitdiff_plain;h=3ca0687d9eab38a71b6cfefa4a522aa488a379ec Fix PAZ-10108: Position recids with leading zeroes --- diff --git a/src/session.c b/src/session.c index e76da0a..1928aae 100644 --- a/src/session.c +++ b/src/session.c @@ -1712,7 +1712,7 @@ static const char *get_mergekey(xmlDoc *doc, xmlNode *root, /* generate unique key if none is not generated already or is empty */ if (wrbuf_len(norm_wr) == 0) { - wrbuf_printf(norm_wr, "position: %s-%d", + wrbuf_printf(norm_wr, "position: %s-%06d", client_get_id(cl), record_no); } else diff --git a/test/test_http_89.res b/test/test_http_89.res index b91efcb..fc2bc62 100644 --- a/test/test_http_89.res +++ b/test/test_http_89.res @@ -186,7 +186,7 @@ idf[1] = log(((1 + total(10))/termoccur(10)); computer: relevance += 100000 * tf[1](1.200000) * idf[1](0.095310) (11437); score = relevance(11437); - position: z3950.indexdata.com/marc-1 + position: z3950.indexdata.com/marc-000001 How to program a computer @@ -210,6 +210,6 @@ idf[1] = log(((1 + total(10))/termoccur(10)); computer: relevance += 100000 * tf[1](1.200000) * idf[1](0.095310) (11437); score = relevance(11437); - position: z3950.indexdata.com/marc-2 + position: z3950.indexdata.com/marc-000002 \ No newline at end of file