Are you sure you want the PageRank?

If you just want the rank of a particular result hit against the given
search criteria, use the following code in your search result JSP:

<%
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>");
%>

;)

Have fun...

Cheers,
Daniel

PS: Guys is there any good documentation/tutorials on Nutch anywhere
besides the WIKI and the standard tutorial??

On 10/21/05, Mike Smith <[EMAIL PROTECTED]> wrote:
> How can i get the search hit scores? I found a boost field but it is
> 1.0 for all the hits. Is there anyway to have something like google
> page rank on these results?
>
> Thanks. Mike
>

Reply via email to