cpoerschke commented on code in PR #3565:
URL: https://github.com/apache/solr/pull/3565#discussion_r2313879360


##########
solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java:
##########
@@ -905,7 +906,61 @@ protected boolean addFL(StringBuilder fl, String field, 
boolean additionalAdded)
     return true;
   }
 
+  protected abstract static class ShardDocQueue {

Review Comment:
   I like that idea, thanks for the suggestion.
   
   Though on trying it out, then it didn't quite work out since 
`ShardFieldSortedHitQueue` would need to implement the `push` as either `add` 
or `insertWithOverflow` and making that choice doesn't seem particularly 
intuitive: 
https://github.com/apache/lucene/blob/releases/lucene/10.2.2/lucene/core/src/java/org/apache/lucene/util/PriorityQueue.java#L150-L184
   
   However, making `DefaultShardDocQueue` into an anonymous class seems a good 
alternative, both locally for `QueryComponent` and if a deriving class needed 
to maintain a container alongside of `ShardFieldSortedHitQueue` or instead of 
it.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to