Round off the rank score of search hits to two decimal places
authorMagnus Hagander <magnus@hagander.net>
Sun, 29 Jan 2012 12:32:53 +0000 (13:32 +0100)
committerMagnus Hagander <magnus@hagander.net>
Sun, 29 Jan 2012 12:32:53 +0000 (13:32 +0100)
templates/search/listsearch.html
templates/search/sitesearch.html

index c371de1bfd21b7ad055303294dd5680c57e0ac8c..64aa51f68bd726cc92b7315074aea4cdbb80d8f1 100644 (file)
@@ -49,7 +49,7 @@
    <h2>Results {{firsthit}}-{{lasthit}} of {%if hitcount = 1000%}more than 1000{%else%}{{hitcount}}{%endif%}.</h2>
    {%if pagelinks %}Result pages: {{pagelinks|safe}}<br/><br/>{%endif%}
    {%for hit in hits %}
-    {{forloop.counter0|add:firsthit}}. <a href="http://archives.postgresql.org/{{hit.list}}/{{hit.year}}-{{hit.month}}/msg{{hit.msgnum}}.php">{{hit.subject}}</a> [{{hit.rank}}]<br/>
+    {{forloop.counter0|add:firsthit}}. <a href="http://archives.postgresql.org/{{hit.list}}/{{hit.year}}-{{hit.month}}/msg{{hit.msgnum}}.php">{{hit.subject}}</a> [{{hit.rank|floatformat:2}}]<br/>
 {{hit.abstract|safe}}<br/>
 <a href="http://archives.postgresql.org/{{hit.list}}/{{hit.year}}-{{hit.month}}/msg{{hit.msgnum}}.php">http://archives.postgresql.org/{{hit.list}}/{{hit.year}}-{{hit.month}}/msg{{hit.msgnum}}.php</a><br/>
     <br/>
index bd1ac6db13e88610040e3c05116bc179ef82280e..54225164d6040546917ca919c9d95897bb054f67 100644 (file)
@@ -31,7 +31,7 @@
    <h2>Results {{firsthit}}-{{lasthit}} of {%if hitcount = 1000%}more than 1000{%else%}{{hitcount}}{%endif%}.</h2>
    {%if pagelinks %}Result pages: {{pagelinks|safe}}<br/><br/>{%endif%}
    {%for hit in hits %}
-    {{forloop.counter0|add:firsthit}}. <a href="{{hit.url}}">{{hit.title}}</a> [{{hit.rank}}]<br/>
+    {{forloop.counter0|add:firsthit}}. <a href="{{hit.url}}">{{hit.title}}</a> [{{hit.rank|floatformat:2}}]<br/>
     <div>...{{hit.abstract|safe}}...</div>
     <a href="{{hit.url}}">{{hit.url}}</a><br/>
     <br/>