Hits doesn't keep track of all 100,000 matches, only the first 100. 
It dynamically collects more matches if it needs to.

-Yonik

On 1/19/06, Daniel Pfeifer <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am currently looking for a way to limit the amount of Hits which are
> returned by a Query.
>
> What I am doing is following:
>
> Searcher s = ...;
> Query q = QueryParser.parse("...", "...", new StandardAnalyzer());
> searcher.search(query);
>
> We have approximately 10 million products in our Index and of these 10
> million products there might be 100.000 which have the word "processor"
> in it's description.
>
> Say a user on our website is searching for processor the Index (to which
> I connect by RMI) is finding 100.000 products and returns these Hits.
>
> Is it possible to implement away to return no more than 1000 products?
> Is it possible to add something like "name:processor AND
> maxresults:1000"?
>
> Thanks in advance!
> /Daniel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to