gsmiller commented on PR #843:
URL: https://github.com/apache/lucene/pull/843#issuecomment-1112602017

   Thanks for all your thoughts @Yuti-G! I think I still disagree with changing 
the current behavior. If we want to implement the contract of `getTopChildren` 
properly, we'd need to sort by count. That's what "top" means in this API, and 
I think it's a bit confusing to start enforcing a "top n" parameter when "top" 
isn't really properly defined here. If you have a use-case that needs to 
actually truncate to `n` ranges while retaining the existing order of ranges 
originally provided as a user, why not do it outside of the facet code? There's 
no reason you can't get back all ranges as it works today and then just 
truncate to the number you want right? That's essentially what you're proposing 
putting in the faceting code, but I'm not sure doing that is the right thing to 
do here.
   
   All this said, I'm in favor of exploring the addition of a `getAllChildren` 
method that would retain this functionality and then properly implementing 
`getTopChildren` that orders by count if there's a use-case for that. I suspect 
there is.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to