Round off the rank score of search hits to two decimal places

This commit is contained in:
Magnus Hagander
2012-01-29 13:32:53 +01:00
parent 8501359ef0
commit d35a009e27
2 changed files with 2 additions and 2 deletions

View 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/>

View 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/>