Merge branch 'master' into paz-927
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 23 Apr 2014 09:16:07 +0000 (11:16 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 23 Apr 2014 09:16:07 +0000 (11:16 +0200)
IDMETA
NEWS
debian/changelog
etc/cf.xsl
etc/default.xml
etc/settings/testserver.xml
etc/solr-pz2.xsl
src/client.c
win/makefile

diff --git a/IDMETA b/IDMETA
index cd9e2ab..6edeef4 100644 (file)
--- a/IDMETA
+++ b/IDMETA
@@ -1,4 +1,4 @@
 DEBIAN_DIST="jessie wheezy squeeze"
-UBUNTU_DIST="saucy raring quantal precise oneiric lucid"
+UBUNTU_DIST="trusty saucy raring quantal precise oneiric lucid"
 CENTOS_DIST="centos5 centos6"
-VERSION=1.6.39
+VERSION=1.6.40
diff --git a/NEWS b/NEWS
index 2a7fbc2..f23d78f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,17 @@
+--- 1.6.40 2014/04/10
+
+sortmap relevance always uses increasing=1. PAZ-930
+
+solr-pz2.xsl: ensure medium is also applied if Solr record do not
+have it. PAZ-929 
+
+Fix leak in getaddrinfo usage for HTTP listener. Not a big deal because
+this code is only executed once.
+
+Fix typos is sortmap documentation.
+
+Doc: fix misplaced variablelist tag.
+
 --- 1.6.39 2014/02/19
 
 Doc: update WRT ICU which is configured for YAZ; not Pazpar2.
index 4ceb9b3..782d3ef 100644 (file)
@@ -1,3 +1,9 @@
+pazpar2 (1.6.40-1.indexdata) unstable; urgency=medium
+
+  * Upstream.
+
+ -- Adam Dickmeiss <adam@indexdata.dk>  Thu, 10 Apr 2014 15:28:09 +0200
+
 pazpar2 (1.6.39-1.indexdata) unstable; urgency=medium
 
   * Upstream.
index c871ae8..7796273 100644 (file)
   <xsl:template match="/record">
     <pz:record>
       <pz:metadata type="medium">
-         <xsl:value-of select="$medium" />
+        <xsl:choose>
+          <xsl:when test="string-length($medium)">
+            <xsl:value-of select="$medium" />
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:if test="medium">
+             <xsl:value-of select="medium" />
+            </xsl:if>
+          </xsl:otherwise>
+        </xsl:choose>
       </pz:metadata>
       <xsl:apply-templates/>
     </pz:record>
       <xsl:value-of select="."/>
     </pz:metadata>
   </xsl:template>
+  
+  <!-- no-op template to avoid printing medium out --> 
+  <xsl:template match="medium" />
 
   <xsl:template match="*" >
     <pz:metadata type="{local-name()}">
index 66312dd..11f6f03 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <service  xmlns="http://www.indexdata.com/pazpar2/1.0">
   <timeout session="60" z3950_operation="30" z3950_session="180"/>
-  <settings src="settings/testserver.xml"/>
+  <settings src="settings/wikipedia.xml"/>
   
   <icu_chain id="relevance" locale="en">
     <transform rule="[:Control:] Any-Remove"/>
index 69a8c36..36435b1 100644 (file)
@@ -6,7 +6,8 @@
   <set name="pz:apdulog" value="1"/>
 
   <!-- mapping for unqualified search -->
-  <set name="pz:cclmap:term" value="u=1016 t=l,r s=al"/>
+  <!-- <set name="pz:cclmap:term" value="u=1016 t=l,r s=al"/> -->
+  <set name="pz:cclmap:term" value="u=my\x2cb t=l,r s=al"/>
 
   <!-- field-specific mappings -->
   <set name="pz:cclmap:ti" value="u=4 s=al"/>
index 4fe7bc1..f6fa5dd 100644 (file)
 
   <xsl:template match="doc">
     <pz:record>
+      <xsl:if test="string-length($medium) &gt; 0">
+        <pz:metadata type="medium">
+           <xsl:value-of select="$medium"/>
+        </pz:metadata>
+      </xsl:if>
       <xsl:apply-templates></xsl:apply-templates>
     </pz:record>
   </xsl:template>
@@ -61,8 +66,7 @@
          <xsl:value-of select="../@name"/>
        </xsl:attribute>
        <xsl:choose>
-         <xsl:when test="../@name = 'medium' and string-length($medium) > 0">
-           <xsl:value-of select="$medium"/>
+         <xsl:when test="../@name = 'medium' and string-length($medium) = 0">
          </xsl:when>
          <xsl:otherwise>
            <xsl:value-of select="."/>
index 3b1e93a..8ad2220 100644 (file)
@@ -1501,6 +1501,8 @@ int client_parse_sort(struct client *cl, struct reclist_sortparms *sp)
         const char *sort_strategy_and_spec =
             get_strategy_plus_sort(cl, sp->name);
         int increasing = sp->increasing;
+        if (!strcmp(sp->name, "relevance"))
+            increasing = 1;
         if (sort_strategy_and_spec && strlen(sort_strategy_and_spec) < 40)
         {
             char strategy[50], *p;
index 312cc21..dbbaf5e 100644 (file)
@@ -5,7 +5,7 @@
 DEBUG=0   # 0 for release, 1 for debug
 USE_MANIFEST = 1 # Can be enabled Visual Studio 2005/2008
 PACKAGE_NAME=pazpar2
-PACKAGE_VERSION=1.6.38
+PACKAGE_VERSION=1.6.40
 
 # YAZ
 YAZ_DIR=..\..\yaz