lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claudio ." <spcicli...@hotmail.com>
Subject RE: Optimization of memory usage in PriorityQueue
Date Tue, 23 Jun 2009 00:57:51 GMT

>> I think the common use case of TopScoreDocCollector is to request
10 results, then ask for 20 and so on. You ask for N results because
you want to display them, or manipulate them in some way.

>>
However, if we do add this to the base PQ, it means an extra check for
every put() call. We've tried very hard recently to remove 'if' checks
in TopScoreDocCollector and TopFieldCollector, so adding one back does
not seem very appealing to me, especially since I IMO the use case
of requesting 10K results w/o knowing first there are more or so that
match the query, is not so common.

Hi serera,

Ok, I understood.
I think the Lucene team could add a warning in the javadoc, warning that will be created internally
an Object[] with the size of top. 
I thought that the Lucene would create internally an array with the number of results. 
The users can set high values of top (like me) without knowing that they are wasting memory.
Thanks!

_________________________________________________________________
More than messages–check out the rest of the Windows Live™.
http://www.microsoft.com/windows/windowslive/
Mime
View raw message