Re: Searching is taking a lot...

2006-06-29 Thread heritrix . lucene
Ya you are correct. My idea will not work when there are lots of documents in the index and also there are lots of hits for that page. I am going with you :-) Thanx... On 6/29/06, James Pine <[EMAIL PROTECTED]> wrote: Hey, I'm not a performance guru, but it seems to me that if you've got

Re: Searching is taking a lot...

2006-06-29 Thread James Pine
Hey, I'm not a performance guru, but it seems to me that if you've got millions of results coming back then you probably don't want to call ArrayList.add() each time, as it will have to grow itself a bunch of times. Also, even ints take up space in memory, so if you only need 20 of them, then stor

Re: Searching is taking a lot...

2006-06-29 Thread heritrix . lucene
perhaps that's not what you ment, perhaps you aren't iterating over any results, in which case using a HitCOllector instead isn't neccessary going to bring that 17sec down. As i told earlier that for the same query minimum time is 2-3 sec and this time is after several attempt(so i think upto th

Re: Searching is taking a lot...

2006-06-29 Thread heritrix . lucene
This will break performance. It is better to first collect all the document numbers (code without the proper declarations): public void collect(int id, float score) { if(docCount >= startDoc && docCount < endDoc) { docNrs.add(id); // or use int[] docNrs when possible. Why

Re: Searching is taking a lot...

2006-06-29 Thread Paul Elschot
On Thursday 29 June 2006 06:17, James Pine wrote: > A HitCollector object invokes its collect method on > every document which matches the query/filter > submitted to the Searcher.search method. I think all > you would need to do is pass in the page number and > results per page to your HitCollecto

Re: Searching is taking a lot...

2006-06-28 Thread Chris Hostetter
ou're not using the Hits object" comment was in direct response to this... : When the resultSet is very big, Searching is taking a lot of time. : For returning responce of a query that finds approx 14 M results, first time : it is taking approx 17Sec. the comment was addressing the fact

Re: Searching is taking a lot...

2006-06-28 Thread James Pine
A HitCollector object invokes its collect method on every document which matches the query/filter submitted to the Searcher.search method. I think all you would need to do is pass in the page number and results per page to your HitCollector constructor and then in the collect method do the bookeepi

Re: Searching is taking a lot...

2006-06-28 Thread heritrix . lucene
I am using Hits object to collect all documents. Let me tell you my problem. I am creating a web application. Every time when a user looks for something it goes and search the index and return the results. Results may be in millions. So for displaying results, i am doing pagination. Here the probl

Re: Searching is taking a lot...

2006-06-28 Thread Erick Erickson
I hope you're not using the Hits object to assemble all 14M results. A recurring theme is that a Hits object should NOT be used for collection more than a few (100 I think) objects since it re-executes the query every 100 or so terms it returns. It's intent is to efficiently return the first few h

Re: Searching is taking a lot...

2006-06-28 Thread heritrix . lucene
Hi, I think i have posted this question in some other thread... When the resultSet is very big, Searching is taking a lot of time. For returning responce of a query that finds approx 14 M results, first time it is taking approx 17Sec. But next time for the same query it is taking almost 2 seconds

Re: Searching is taking a lot...

2006-06-27 Thread heritrix . lucene
No. I am not sorting the data... On 6/27/06, Martin Braun <[EMAIL PROTECTED]> wrote: Hi chris, > searching everytime using a new searcher was taking time. So For testing, i > made it a static one and reused the same. This gave me a lot of > improvement. > Previously my query was taking approx

Re: Searching is taking a lot...

2006-06-27 Thread Martin Braun
Hi chris, > searching everytime using a new searcher was taking time. So For testing, i > made it a static one and reused the same. This gave me a lot of > improvement. > Previously my query was taking approx 25 sec. But now most of the queries > are taking time between the 100 and 800 ms. Do you

Re: Searching is taking a lot...

2006-06-27 Thread Paul Elschot
On Tuesday 27 June 2006 09:23, heritrix.lucene wrote: > Hi, > First of all, thanks for your attention... > I think i've got the solution. > Actually earlier, everytime for each query i was creating a different > searcher object. Creating searcher object was not taking a lot. But > searching everyti

Re: Searching is taking a lot...

2006-06-27 Thread heritrix . lucene
Hi, First of all, thanks for your attention... I think i've got the solution. Actually earlier, everytime for each query i was creating a different searcher object. Creating searcher object was not taking a lot. But searching everytime using a new searcher was taking time. So For testing, i made i

Re: Searching is taking a lot...

2006-06-26 Thread Chris Hostetter
: Can you provide some information on your setup? How are you indexing : and searching? Do you have a lot of terms in your query, etc? Have you : done any profiling of your setup to determine where the bottlenecks : are? Are you sure they are in Lucene? what methods are you using for doing t

Re: Searching is taking a lot...

2006-06-26 Thread Grant Ingersoll
Can you provide some information on your setup? How are you indexing and searching? Do you have a lot of terms in your query, etc? Have you done any profiling of your setup to determine where the bottlenecks are? Are you sure they are in Lucene? -Grant heritrix.lucene wrote: Hi, I have

Searching is taking a lot...

2006-06-26 Thread heritrix . lucene
Hi, I have created an index of 47 Million documents. I have 1.28GB RAM. When i am doing a search over this index it is taking on average 25 sec. Is there a way so that i can get results in part of a second... I hope there must be some ways.. Thanks and regards..