Re: TopDocs question

2008-09-15 Thread Cam Bazz
Otis > -- > Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch > > > > - Original Message >> From: Cam Bazz <[EMAIL PROTECTED]> >> To: java-user@lucene.apache.org >> Sent: Monday, September 15, 2008 11:25:39 PM >> Subject: Re: TopDocs

Re: TopDocs question

2008-09-15 Thread Otis Gospodnetic
ent: Monday, September 15, 2008 11:25:39 PM > Subject: Re: TopDocs question > > Yes, I looked into implementing a custom collector that would return > number of hits, but - I could not. > > collect() can not access anything that is final, and final can not be > incremented.

Re: TopDocs question

2008-09-15 Thread Cam Bazz
Yes, I looked into implementing a custom collector that would return number of hits, but - I could not. collect() can not access anything that is final, and final can not be incremented. Any ideas? Best. On Tue, Sep 16, 2008 at 6:05 AM, Daniel Noll <[EMAIL PROTECTED]> wrote: > Cam Bazz wrote: >

Re: TopDocs question

2008-09-15 Thread Daniel Noll
Cam Bazz wrote: Hello, Could it harm if I make a searcher.search(query, Integer.MAX_VALUE) ? I just need to make a query to get the number of hits in this case, but I dont know what the max hits will be. PriorityQueue will attempt to allocate an array of that size. But if you only need to k

TopDocs question

2008-09-15 Thread Cam Bazz
Hello, Could it harm if I make a searcher.search(query, Integer.MAX_VALUE) ? I just need to make a query to get the number of hits in this case, but I dont know what the max hits will be. Also When I make a topdocs.totalHits is that same as topdocs.scoreDocs.length()? Best. -C.A. ---