Re: displaying 'pages' of search results...
From: "Karthik N S" <[EMAIL PROTECTED]> To: "Lucene Users List" <[EMAIL PROTECTED]> Sent: Wednesday, September 22, 2004 2:53 AM Subject: displaying 'pages' of search results... > Hi > > Can u share the searcher.search(query, hitCollector); [light weight paging > api ] > > Code on the form ,may be somebody like me need's it. > > > ; ) > > Karthik > > -Original Message- > From: Praveen Peddi [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 22, 2004 1:24 AM > To: Lucene Users List > Subject: Re: displaying 'pages' of search results... > > > The way we do it is: Get all the document ids, cache them and then get the > first 50, second 50 documents etc. We wrote a light weight paging api on top > of lucene. We call searcher.search(query, hitCollector); Our > HitCollectorImpl implements collect method and just collects the document id > only. > > Praveen > > > - Original Message - > From: "Chris Fraschetti" <[EMAIL PROTECTED]> > To: "Lucene Users List" <[EMAIL PROTECTED]> > Sent: Tuesday, September 21, 2004 3:33 PM > Subject: displaying 'pages' of search results... > > >>I was wondering was the best way was to go about returning say >> 1,000,000 results, divided up into say 50 element sections and then >> accessing them via the first 50, second 50, etc etc. >> >> Is there a way to keep the query around so that lucene doesn't need to >> search again, or would the search be cached and no delay arise? >> >> Just looking for some ideas and possibly some implementational issues... >> >> >> >> -- >> ___ >> Chris Fraschetti >> e [EMAIL PROTECTED] >> >> - >> 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] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
displaying 'pages' of search results...
Hi Can u share the searcher.search(query, hitCollector); [light weight paging api ] Code on the form ,may be somebody like me need's it. ; ) Karthik -Original Message- From: Praveen Peddi [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 1:24 AM To: Lucene Users List Subject: Re: displaying 'pages' of search results... The way we do it is: Get all the document ids, cache them and then get the first 50, second 50 documents etc. We wrote a light weight paging api on top of lucene. We call searcher.search(query, hitCollector); Our HitCollectorImpl implements collect method and just collects the document id only. Praveen - Original Message - From: "Chris Fraschetti" <[EMAIL PROTECTED]> To: "Lucene Users List" <[EMAIL PROTECTED]> Sent: Tuesday, September 21, 2004 3:33 PM Subject: displaying 'pages' of search results... >I was wondering was the best way was to go about returning say > 1,000,000 results, divided up into say 50 element sections and then > accessing them via the first 50, second 50, etc etc. > > Is there a way to keep the query around so that lucene doesn't need to > search again, or would the search be cached and no delay arise? > > Just looking for some ideas and possibly some implementational issues... > > > > -- > ___ > Chris Fraschetti > e [EMAIL PROTECTED] > > - > 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: displaying 'pages' of search results...
The way we do it is: Get all the document ids, cache them and then get the first 50, second 50 documents etc. We wrote a light weight paging api on top of lucene. We call searcher.search(query, hitCollector); Our HitCollectorImpl implements collect method and just collects the document id only. Praveen - Original Message - From: "Chris Fraschetti" <[EMAIL PROTECTED]> To: "Lucene Users List" <[EMAIL PROTECTED]> Sent: Tuesday, September 21, 2004 3:33 PM Subject: displaying 'pages' of search results... I was wondering was the best way was to go about returning say 1,000,000 results, divided up into say 50 element sections and then accessing them via the first 50, second 50, etc etc. Is there a way to keep the query around so that lucene doesn't need to search again, or would the search be cached and no delay arise? Just looking for some ideas and possibly some implementational issues... -- ___ Chris Fraschetti e [EMAIL PROTECTED] - 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]
Re: displaying 'pages' of search results...
On Tuesday 21 September 2004 21:33, Chris Fraschetti wrote: > I was wondering was the best way was to go about returning say > 1,000,000 results, divided up into say 50 element sections and then > accessing them via the first 50, second 50, etc etc. > > Is there a way to keep the query around so that lucene doesn't need to > search again, or would the search be cached and no delay arise? > > Just looking for some ideas and possibly some implementational issues... Lucene's Hits class is designed for paging through search results. In which order would you need the 1.000.000 results? Regards, Paul Elschot - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: displaying 'pages' of search results...
The best first approach is to simply re-query every time the user goes to a new page, keeping around the query in some for or another (perhaps the expression if you're using QueryParser) and the page number. If that is fast enough, then you're done! :) If it is not, then you could consider caching Hits and your IndexSearcher to re-use when paging. Erik On Sep 21, 2004, at 3:33 PM, Chris Fraschetti wrote: I was wondering was the best way was to go about returning say 1,000,000 results, divided up into say 50 element sections and then accessing them via the first 50, second 50, etc etc. Is there a way to keep the query around so that lucene doesn't need to search again, or would the search be cached and no delay arise? Just looking for some ideas and possibly some implementational issues... -- ___ Chris Fraschetti e [EMAIL PROTECTED] - 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]
displaying 'pages' of search results...
I was wondering was the best way was to go about returning say 1,000,000 results, divided up into say 50 element sections and then accessing them via the first 50, second 50, etc etc. Is there a way to keep the query around so that lucene doesn't need to search again, or would the search be cached and no delay arise? Just looking for some ideas and possibly some implementational issues... -- ___ Chris Fraschetti e [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]