lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claudio ." <spcicli...@hotmail.com>
Subject Optimization of memory usage in PriorityQueue
Date Sun, 21 Jun 2009 23:39:19 GMT

Hi,

    
The PriorityQueue used in TopDocCollector does not optimize the memory usage. If I do this
search:

TopDocs topDocs = searcher.search(query, null, 10000);    
    
And only 1 document is returned. The PriorityQueue will create an Object[] of size 10000 +
1, but only one position of the array is used.
    
The Lucene could implement a PriorityQueue with size extensible.

The PriorityQueue of the Sun is size extensible. Why does not use it?

Thanks
_________________________________________________________________
Drag n’ drop—Get easy photo sharing with Windows Live™ Photos.

http://www.microsoft.com/windows/windowslive/products/photos.aspx
Mime
View raw message