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