Does nutch provide any API to map the score to rank (i.e. 1 -10). I found
the following code in mailing lists. Can someone explain this formula. Why
do we need to multiply score by 5. Is the score itself rank. Is it always
going to be between 0-10? I think score can be anywhere in 0 and infinity.
Please post the formula for showing rank or %age with a little bit of
explanation.
<%
> float resultrank = 0;
> FloatWritable indexnumber =
> (FloatWritable)hit.getSortValue();
> resultrank = indexnumber.get();
> %>
>
> if you also want to display it in a cool bar next to
> the result,
> insert this code:
>
> <%
> float relevance = Math.round(indexnum * 5);
> out.print("<table width=\"50\" border=\"1\"
> cellpadding=\"0\"
> cellspacing=\"0\"><tr>");
> out.print("<td width=\"" + relevance + "\"
> bgcolor=\"blue\"
> height=\"4\"></td><td width=\"*\"
> height=\"4\"></td>");
> out.print("</tr></table>");
> %>