title: How can I use Lucene's PriorityQueue when I don't know the max size at create time?
body: <p>I built a custom collector for Lucene.Net, but I can't figure out how to order (or page) the results.  Everytime Collect gets called, I can add the result to an internal PriorityQueue, which I understand is the correct way to do this.</p>
  
  <p>I extended the PriorityQueue, but it requires a size parameter on creation.  You have to call Initialize in the constructor and pass in the max size.</p>
  
  <p>However, in a collector, the searcher just calls Collect when it gets a new result, so <em>I don't know how many results I have when I create the PriorityQueue</em>.  Based on this, I can't figure out how to make the PriorityQueue work.</p>
  
  <p>I realize I'm probably missing something simple here...</p>