Github user guidotag commented on the pull request:

    https://github.com/apache/lucenenet/pull/103#issuecomment-75101543
  
    Java's priority queue can manage an "unbounded" number of elements and to 
do so it uses a resizable representation. From PriorityQueue's javadoc: "A 
priority queue is unbounded, but has an internal capacity governing the size of 
an array used to store the elements on the queue. It is always at least as 
large as the queue size. As elements are added to a priority queue, its 
capacity grows automatically." So yes, it has an internal resizing procedure.
    
    In the TopTermRewrite class it is not clear what size we will need at most:
    
    
https://github.com/guidotag/lucenenet/commit/9428451c8ee87b39efeb2c39b94eb153067a066e#diff-226e1a7768fe596cf640cfef43c6f60fL74
    
    so we need the representation's size to grow dynamically.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to