You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by Goethe <ko...@hotmail.com> on 2007/07/30 05:05:23 UTC
How do I remove ShowAllHits
Sorry guys, but this is pretty much the only thing left for my nutch to run
smoothly, it's probally something small, but I'm stuck at it.
I wanna remove the Show all hits button and leave the Next button only, I'm
pretty sure it all comes to those 2 forms below in the file search.jsp.
If i remove the second if where the show all hits appear, the next button
won't show up, however if I remove the If from next, it appears, but it
doesn't work, the next page is something like Results from page 11-10, and
now results show up.
Can anyone lend me a hand and tell me what i'm doing wrong?
<%
if ((hits.totalIsExact() && end < hits.getTotal()) // more hits to show
|| (!hits.totalIsExact() && (hits.getLength() > start+hitsPerPage)))
{
%>
<form name="next" action="../search.jsp" method="get">
<input type="hidden" name="query" value="<%=htmlQueryString%>">
<input type="hidden" name="lang" value="<%=queryLang%>">
<input type="hidden" name="start" value="<%=end%>">
<input type="hidden" name="hitsPerPage" value="<%=hitsPerPage%>">
<input type="hidden" name="hitsPerSite" value="<%=hitsPerSite%>">
<input type="hidden" name="clustering" value="<%=clustering%>">
<input type="submit" value="<i18n:message key="next"/>">
<% if (sort != null) { %>
<input type="hidden" name="sort" value="<%=sort%>">
<input type="hidden" name="reverse" value="<%=reverse%>">
<% } %>
</form>
<%
}
if ((!hits.totalIsExact() && (hits.getLength() <= start+hitsPerPage)))
{
%>
<form name="showAllHits" action="../search.jsp" method="get">
<input type="hidden" name="query" value="<%=htmlQueryString%>">
<input type="hidden" name="lang" value="<%=queryLang%>">
<input type="hidden" name="hitsPerPage" value="<%=hitsPerPage%>">
<input type="hidden" name="hitsPerSite" value="0">
<input type="hidden" name="clustering" value="<%=clustering%>">
<input type="submit" value="Exibir Tudo">
<% if (sort != null) { %>
<input type="hidden" name="sort" value="<%=sort%>">
<input type="hidden" name="reverse" value="<%=reverse%>">
<% } %>
</form>
<%
}
%>
--
View this message in context: http://www.nabble.com/How-do-I-remove-ShowAllHits-tf4167756.html#a11857513
Sent from the Nutch - User mailing list archive at Nabble.com.
Re: How do I remove ShowAllHits
Posted by Susam Pal <su...@gmail.com>.
In case you want to do more reading, there is also a detailed
discussion regarding this here:-
http://www.mail-archive.com/nutch-user@lucene.apache.org/msg08363.html
Regards,
Susam Pal
http://susam.in/
> 2007/7/30, Goethe <ko...@hotmail.com>:
> >
> >
> >
> > Sorry guys, but this is pretty much the only thing left for my nutch to
> > run
> > smoothly, it's probally something small, but I'm stuck at it.
> >
> > I wanna remove the Show all hits button and leave the Next button only,
> > I'm
> > pretty sure it all comes to those 2 forms below in the file search.jsp.
> >
> > If i remove the second if where the show all hits appear, the next button
> > won't show up, however if I remove the If from next, it appears, but it
> > doesn't work, the next page is something like Results from page 11-10, and
> > now results show up.
> >
> > Can anyone lend me a hand and tell me what i'm doing wrong?
> >
> >
> > <%
> >
> > if ((hits.totalIsExact() && end < hits.getTotal()) // more hits to show
> > || (!hits.totalIsExact() && (hits.getLength() > start+hitsPerPage)))
> > {
> > %>
> > <form name="next" action="../search.jsp" method="get">
> > <input type="hidden" name="query" value="<%=htmlQueryString%>">
> > <input type="hidden" name="lang" value="<%=queryLang%>">
> > <input type="hidden" name="start" value="<%=end%>">
> > <input type="hidden" name="hitsPerPage" value="<%=hitsPerPage%>">
> > <input type="hidden" name="hitsPerSite" value="<%=hitsPerSite%>">
> > <input type="hidden" name="clustering" value="<%=clustering%>">
> > <input type="submit" value="<i18n:message key="next"/>">
> > <% if (sort != null) { %>
> > <input type="hidden" name="sort" value="<%=sort%>">
> > <input type="hidden" name="reverse" value="<%=reverse%>">
> > <% } %>
> > </form>
> > <%
> > }
> >
> >
> > if ((!hits.totalIsExact() && (hits.getLength() <= start+hitsPerPage)))
> > {
> > %>
> > <form name="showAllHits" action="../search.jsp" method="get">
> > <input type="hidden" name="query" value="<%=htmlQueryString%>">
> > <input type="hidden" name="lang" value="<%=queryLang%>">
> > <input type="hidden" name="hitsPerPage" value="<%=hitsPerPage%>">
> > <input type="hidden" name="hitsPerSite" value="0">
> > <input type="hidden" name="clustering" value="<%=clustering%>">
> > <input type="submit" value="Exibir Tudo">
> > <% if (sort != null) { %>
> > <input type="hidden" name="sort" value="<%=sort%>">
> > <input type="hidden" name="reverse" value="<%=reverse%>">
> > <% } %>
> > </form>
> > <%
> > }
> > %>
> > --
> > View this message in context:
> > http://www.nabble.com/How-do-I-remove-ShowAllHits-tf4167756.html#a11857513
> > Sent from the Nutch - User mailing list archive at Nabble.com.
> >
> >
>
>
> --
> ********************************************************
> Le Quoc Anh
> Tel: 0912643289
> http://quocanh263.googlepages.com/homepage
> 4/268 Le Trong Tan, Hanoi, Vietnam
> ********************************************************
>
Re: How do I remove ShowAllHits
Posted by LE QuocAnh <qu...@gmail.com>.
find in the file search.jsp and add this line
int hitsPerSite = 0;
2007/7/30, Goethe <ko...@hotmail.com>:
>
>
>
> Sorry guys, but this is pretty much the only thing left for my nutch to
> run
> smoothly, it's probally something small, but I'm stuck at it.
>
> I wanna remove the Show all hits button and leave the Next button only,
> I'm
> pretty sure it all comes to those 2 forms below in the file search.jsp.
>
> If i remove the second if where the show all hits appear, the next button
> won't show up, however if I remove the If from next, it appears, but it
> doesn't work, the next page is something like Results from page 11-10, and
> now results show up.
>
> Can anyone lend me a hand and tell me what i'm doing wrong?
>
>
> <%
>
> if ((hits.totalIsExact() && end < hits.getTotal()) // more hits to show
> || (!hits.totalIsExact() && (hits.getLength() > start+hitsPerPage)))
> {
> %>
> <form name="next" action="../search.jsp" method="get">
> <input type="hidden" name="query" value="<%=htmlQueryString%>">
> <input type="hidden" name="lang" value="<%=queryLang%>">
> <input type="hidden" name="start" value="<%=end%>">
> <input type="hidden" name="hitsPerPage" value="<%=hitsPerPage%>">
> <input type="hidden" name="hitsPerSite" value="<%=hitsPerSite%>">
> <input type="hidden" name="clustering" value="<%=clustering%>">
> <input type="submit" value="<i18n:message key="next"/>">
> <% if (sort != null) { %>
> <input type="hidden" name="sort" value="<%=sort%>">
> <input type="hidden" name="reverse" value="<%=reverse%>">
> <% } %>
> </form>
> <%
> }
>
>
> if ((!hits.totalIsExact() && (hits.getLength() <= start+hitsPerPage)))
> {
> %>
> <form name="showAllHits" action="../search.jsp" method="get">
> <input type="hidden" name="query" value="<%=htmlQueryString%>">
> <input type="hidden" name="lang" value="<%=queryLang%>">
> <input type="hidden" name="hitsPerPage" value="<%=hitsPerPage%>">
> <input type="hidden" name="hitsPerSite" value="0">
> <input type="hidden" name="clustering" value="<%=clustering%>">
> <input type="submit" value="Exibir Tudo">
> <% if (sort != null) { %>
> <input type="hidden" name="sort" value="<%=sort%>">
> <input type="hidden" name="reverse" value="<%=reverse%>">
> <% } %>
> </form>
> <%
> }
> %>
> --
> View this message in context:
> http://www.nabble.com/How-do-I-remove-ShowAllHits-tf4167756.html#a11857513
> Sent from the Nutch - User mailing list archive at Nabble.com.
>
>
--
********************************************************
Le Quoc Anh
Tel: 0912643289
http://quocanh263.googlepages.com/homepage
4/268 Le Trong Tan, Hanoi, Vietnam
********************************************************