You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by AlexElba <ra...@yahoo.com> on 2009/02/04 02:37:04 UTC

TopDocCollector vs Hits: TopDocCollector slowing....

Hello,

I was using lucene 2.3.2 with hits and switch to lucene 2.4.0 and now I am
using TopDocCollector.

I have two queries which are running against the same index.
One query is returning 80bytes information other one is returning 2000bytes

With old Hits the query which was returning smaller data was faster which
has bigger data was slower.
After I change to TopDocCollector both big and small once returning same
time. 

Searcher is exactly the same and queries are the same only difference is in
one place I was using Hits in other TopDocCollector 

Who has any idea why, and how can I fix this?
-- 
View this message in context: http://www.nabble.com/TopDocCollector-vs-Hits%3A-TopDocCollector-slowing....-tp21822877p21822877.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: TopDocCollector vs Hits: TopDocCollector slowing....

Posted by AlexElba <ra...@yahoo.com>.


Grant Ingersoll-6 wrote:
> 
> I presume they are both now slower, right?  Otherwise you wouldn't  
> mind the speedup on the bigger one.  Hits did caching and prefetched  
> things, which has it's tradeoffs.  Can you describe how you were  
> measuring the queries?  How many results were you getting?
> 
> 
> 
> -Grant
> 
> On Feb 3, 2009, at 8:37 PM, AlexElba wrote:
> 
>>
>> Hello,
>>
>> I was using lucene 2.3.2 with hits and switch to lucene 2.4.0 and  
>> now I am
>> using TopDocCollector.
>>
>> I have two queries which are running against the same index.
>> One query is returning 80bytes information other one is returning  
>> 2000bytes
>>
>> With old Hits the query which was returning smaller data was faster  
>> which
>> has bigger data was slower.
>> After I change to TopDocCollector both big and small once returning  
>> same
>> time.
>>
>> Searcher is exactly the same and queries are the same only  
>> difference is in
>> one place I was using Hits in other TopDocCollector
>>
>> Who has any idea why, and how can I fix this?
>> -- 
>> View this message in context:
>> http://www.nabble.com/TopDocCollector-vs-Hits%3A-TopDocCollector-slowing....-tp21822877p21822877.html
>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
> 
> --------------------------
> Grant Ingersoll
> http://www.lucidimagination.com/
> 
> Lucene Helpful Hints:
> http://wiki.apache.org/lucene-java/BasicsOfPerformance
> http://wiki.apache.org/lucene-java/LuceneFAQ
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 


I fix the problem. The problem was there queue and pushing and poping they
had. After some optimization of the TopDocCollector it got much faster
-- 
View this message in context: http://www.nabble.com/TopDocCollector-vs-Hits%3A-TopDocCollector-slowing....-tp21822877p22092548.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: TopDocCollector vs Hits: TopDocCollector slowing....

Posted by Grant Ingersoll <gs...@apache.org>.
I presume they are both now slower, right?  Otherwise you wouldn't  
mind the speedup on the bigger one.  Hits did caching and prefetched  
things, which has it's tradeoffs.  Can you describe how you were  
measuring the queries?  How many results were you getting?



-Grant

On Feb 3, 2009, at 8:37 PM, AlexElba wrote:

>
> Hello,
>
> I was using lucene 2.3.2 with hits and switch to lucene 2.4.0 and  
> now I am
> using TopDocCollector.
>
> I have two queries which are running against the same index.
> One query is returning 80bytes information other one is returning  
> 2000bytes
>
> With old Hits the query which was returning smaller data was faster  
> which
> has bigger data was slower.
> After I change to TopDocCollector both big and small once returning  
> same
> time.
>
> Searcher is exactly the same and queries are the same only  
> difference is in
> one place I was using Hits in other TopDocCollector
>
> Who has any idea why, and how can I fix this?
> -- 
> View this message in context: http://www.nabble.com/TopDocCollector-vs-Hits%3A-TopDocCollector-slowing....-tp21822877p21822877.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

--------------------------
Grant Ingersoll
http://www.lucidimagination.com/

Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ












---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org