javanna commented on PR #12891:
URL: https://github.com/apache/lucene/pull/12891#issuecomment-1849753229

   Thanks for merging this @zacharymorn . I am updating Elasticsearch to this 
change and I came to wonder if we should deprecate the static methods that 
create collectors. I do agree on exposing top docs collector managers and 
deprecating the createShared methods, but there are still scenarios in which 
users create collectors where collector managers are not needed, for instance 
situations where IndexSearcher#search is not even called. 
   
   I wanted to double check what folks are thinking around this. The plan isn't 
to deprecate direct usage of collectors, correct? I wonder if it is excessive 
to to now have to create a collector manager to get an instance of a collector 
manager as follows:
   
   ```
     @Deprecated
     public static TopScoreDocCollector create(int numHits, int 
totalHitsThreshold) {
       return new TopScoreDocCollectorManager(numHits, null, 
totalHitsThreshold, false).newCollector();
     }
     ```
   
   This method is now deprecated in favour of interacting with Collector 
managers rather than collectors. I'd like to double check this we are all 
aligned on this direction.
   
   


-- 
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