Re: how to reterieve all results from lucene searcher.search() method

2013-06-19 Thread Michael McCandless
Create a custom Collector? Mike McCandless http://blog.mikemccandless.com On Wed, Jun 19, 2013 at 3:39 AM, Swapnil Patil wrote: > you can get all results for given query "q". By giving documents to fetch > a very big number like Integer.MAX_VALUE. > > But if u want to loop over all documents

RE: New Lucene User

2013-06-19 Thread raghavendra.k.rao
Ashwin, Thank you very much for your suggestions. I will take a look at Solr as well. Regards, Raghu -Original Message- From: Ashwin Tandel [mailto:ashwintan...@gmail.com] Sent: Tuesday, June 18, 2013 6:29 PM To: java-user@lucene.apache.org Subject: Re: New Lucene User Raghav, I wo

Re: Doing concurrent searches efficiently

2013-06-19 Thread Adrien Grand
Hi Roberto, On Wed, Jun 19, 2013 at 12:57 PM, Roberto Ragusa wrote: > Hi, > > I would like an expert opinion about how to optimally do concurrent > searches on the same index (let's suppose there are several threads > doing searches). Consider these options: > > a) one IndexReader, all threads us

Doing concurrent searches efficiently

2013-06-19 Thread Roberto Ragusa
Hi, I would like an expert opinion about how to optimally do concurrent searches on the same index (let's suppose there are several threads doing searches). Consider these options: a) one IndexReader, all threads use it b) cloned IndexReader's, each thread uses a clone c) opened IndexReader's, ea

RE: IndexSearcher using Collector

2013-06-19 Thread Uwe Schindler
Hi, The search function does block. IndexSearcher.search(Query, Collector) returns when all collecting is done. You can do the after-collect work after it returns. Uwe - Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -Original Messag

IndexSearcher using Collector

2013-06-19 Thread amit nanda
Hi, I have multiple index that i want to search against, thus i am using MultiReader for that. Along with this I also want all the matches to the query so i am using Collector class for this. The issue i am facing is that I am not able to know when all the matches are done, i.e. for each matching

Re: segments and sorting

2013-06-19 Thread Adrien Grand
Hi, On Wed, Jun 19, 2013 at 12:16 AM, Sriram Sankar wrote: > Is it possible to do this more efficiently using a merge sort? Assuming > the individual segments are already sorted, is there a wrapper that I can > use where I can pass the same sorting function? I'm guessing the > SlowCompositeRead

Re: how to reterieve all results from lucene searcher.search() method

2013-06-19 Thread neha yadav
You can try like : long docSizeQ1= docs.getNumFound() ; will give you the total number of results. and this value can be inserted in like TopDocs hits = searcher.search(qu,docSizeQ1); Hope this helps. On Wed, Jun 19, 2013 at 1:09 PM, Swapnil Patil wrote: > you can get all results for given que

Re: how to reterieve all results from lucene searcher.search() method

2013-06-19 Thread Swapnil Patil
you can get all results for given query "q". By giving documents to fetch a very big number like Integer.MAX_VALUE. But if u want to loop over all documents. Use index reader and get document by its doc id from 0 to numDocs (Index reader has method for num docs). On Wed, Jun 19, 2013 at 3:11

how to reterieve all results from lucene searcher.search() method

2013-06-19 Thread neeraj shah
hello, Is there any way to get all the search result. In lucene we get top documents by giving the limit like top 100,1000... etc. but if i want to get all results. How can I achieve that?? Query qu = new QueryParser(Version.LUCENE_36,"field", analyzer).parse(query); TopDocs hits = searcher.