Details

Description

currently TopNSearcher enforces the maxQueueSize based on rejectedCount + topN. I have a usecase where I just simply don't know the exact limit and I am ok with a top N that is not 100% exact. Yet, if I don't specify the right upper limit for the queue size I get an assertion error when I run tests but the only workaround it to make the queue unbounded which looks odd while it would possibly work just fine. I think it's fair to add an option that just doesn't enforce the limit and if it shoudl be enforced we throw a real exception.