Hi Sudhanya, I think a little bit different than Michael. Iterating over all hits is a slow process. Therefore repeating the search for each "page" and fetching the results(say 10 or 20) like below may result in a faster response to the user. (I think no one retrieves all of the result pages of a google search).
pageNum=3; numDocs = 10; //Result for one "page" startOffset = pageNum*numDocs; TopDocs result = indexSearcher.Search(query, null, startOffset + numDocs); for (int i = startOffset; i < startOffset+ numDocs; i++) { Document doc = indexSearcher.Reader.Document(result.scoreDocs[i].doc)); ...... } DIGY -----Original Message----- From: Michael Garski [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2008 7:03 PM To: lucene-net-user@incubator.apache.org Subject: RE: lucene.net query Sudhanya, It sounds like you just want a specific 'page' of the results, rather than the entire set, correct? Lucene does not have any built in functionality for this, and I would suggest persisting the results after a query is executed and then paging through them. Michael -----Original Message----- From: Sudhanya Chatterjee [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2008 7:15 AM To: lucene-net-user@incubator.apache.org Subject: lucene.net query Hi, In our application we are using WildcardQuery to fetch the results. Is it possible to get specific range of results? For example - Search results contain 100 records. We want only the result from 11th record till 20th record. Is it possible to do this without iterating through the full result set? OR Is it possible to fire a query where we can specify the start and the number of records required? Thanks, Sudhanya DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.