You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by Mike Smith <mi...@gmail.com> on 2005/10/21 03:00:31 UTC

search result score

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

Re: search result score

Posted by Michael Ji <fj...@yahoo.com>.
I believe PageRank could be obtained by calling
DistributedAnalysisTool. Actually, it should be called
couple of time to get boost score value closed to a
true PageRank, coz each call is just one iteration.

Michael Ji,

--- Daniel Iversen <da...@gmail.com> wrote:

> 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 <mi...@gmail.com>
> 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
> >
> 



		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

Re: search result score

Posted by Daniel Iversen <da...@gmail.com>.
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 <mi...@gmail.com> 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
>

Re: search result score

Posted by Mike Smith <mi...@gmail.com>.
Thanks Bill!
 Mike

 On 10/21/05, Michael Ji <fj...@yahoo.com> wrote:
>
> you should run linkAnalysisTool for your webdb and run
> updateSegmentFromDB to update score to your segments,
>
> Michael Ji,
>
> --- Mike Smith <mi...@gmail.com> 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
> >
>
>
>
>
> __________________________________
> Yahoo! FareChase: Search multiple travel sites in one click.
> http://farechase.yahoo.com
>

Re: search result score

Posted by Michael Ji <fj...@yahoo.com>.
you should run linkAnalysisTool for your webdb and run
updateSegmentFromDB to update score to your segments,

Michael Ji,

--- Mike Smith <mi...@gmail.com> 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
> 



		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com