You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by Nick Pisarro <Ni...@aperture.com> on 2007/06/06 00:43:47 UTC

Changing Initial number of hits/page Searcher shows.

We are using Nutch as a search engine for our MediaWiki site located on
our intranet, all pages are on the same server.

When the Nutch searcher servlet returns its results, it just shows 2
hits. If you want to see more, you must click on "Show all hits".

Is there a search configuration property that controls that? I have not
been able to locate one. Is there one to control the number of hits/page
on subsequent pages?

Thanks in advance.

Nick Pisarro, Jr.
Aperture Technologies, Inc.

RE(2): Changing Initial number of hits/page Searcher shows.

Posted by Nick Pisarro <Ni...@aperture.com>.
Setting hitsPerSite=0 in the URL is perfect! It does exactly what I
want.

Thank you very much.

Nick.

P.S. Do you have a URL pointing to where this URL parameter, and perhaps
other searcher parameters are documented?--Nick

-----Original Message-----
From: Susam Pal [mailto:susam.pal@gmail.com] 
Sent: Wednesday, June 06, 2007 12:50 AM
To: nutch-user@lucene.apache.org
Subject: Re: Changing Initial number of hits/page Searcher shows.

...

HOW TO DISABLE HITS PER SITE:-

This is probably what you want to do. You don't want the results from
a site to be limited because the only site you are searching is your
wiki. To disable this hitsPerSite functionality just set its value to
0. You can do it either of the two ways I have explained in the
previous section.

Regards,
Susam Pal
http://susam.in/

On 6/6/07, Nick Pisarro <Ni...@aperture.com> wrote:
> We are using Nutch as a search engine for our MediaWiki site located
on
> our intranet, all pages are on the same server.
>
> When the Nutch searcher servlet returns its results, it just shows 2
> hits. If you want to see more, you must click on "Show all hits".
>
> Is there a search configuration property that controls that? I have
not
> been able to locate one. Is there one to control the number of
hits/page
> on subsequent pages?
>
> Thanks in advance.
>
> Nick Pisarro, Jr.
> Aperture Technologies, Inc.
>

Re: Changing Initial number of hits/page Searcher shows.

Posted by Susam Pal <su...@gmail.com>.
HITS PER PAGE:-

It is decided by the hitsPerPage parameter in the GET request. e.g.
http://localhost:8080/search.jsp?query=susam+pal&hitsPerPage=5 would
display 5 hits per page.

If no hitsPerPage parameter is specified a default value is coded in
the search.jsp which is perhaps 10. Just look up the hitsPerPage
variable in search.jsp and you can understand how it works. This is
the answer to your question. However this is not the answer to what
you want to do since you have asked the wrong question. :-) Read on to
find what you really want and what you should have really asked. :-)

HITS PER SITE:-

Your trouble is that when you do a query for your wiki, you see only 2
results. This is controlled by hitsPerSite property. May be the
default hitsPerSite value coded in search.jsp is 2. Just find the
hitsPerSite variable in search.jsp and you can see the default value.

Since, you are searching only one site, so only 2 results are going to
be displayed owing to the  hitsPerSite value and hitsPerPage value
becomes irrelevant here.

You can control the hitsPerSite in two ways:-

1. http://localhost:8080/search.jsp?query=susam+pal&hitsPerSite=50
2. Open search.jsp and change the default value of hitsPerSite to 50

In this case, 50 hits per site would be shown and the rest would be
hidden. If you want to see the rest you will have to hit the "Show All
Hits" button. Also, since the hitsPerPage is 10 by default, these 50
results will be displayed in 10 pages. The first four pages would have
"Next" button and the 5th page would have "Show All Hits" button.

HOW TO DISABLE HITS PER SITE:-

This is probably what you want to do. You don't want the results from
a site to be limited because the only site you are searching is your
wiki. To disable this hitsPerSite functionality just set its value to
0. You can do it either of the two ways I have explained in the
previous section.

Regards,
Susam Pal
http://susam.in/

On 6/6/07, Nick Pisarro <Ni...@aperture.com> wrote:
> We are using Nutch as a search engine for our MediaWiki site located on
> our intranet, all pages are on the same server.
>
> When the Nutch searcher servlet returns its results, it just shows 2
> hits. If you want to see more, you must click on "Show all hits".
>
> Is there a search configuration property that controls that? I have not
> been able to locate one. Is there one to control the number of hits/page
> on subsequent pages?
>
> Thanks in advance.
>
> Nick Pisarro, Jr.
> Aperture Technologies, Inc.
>