jpountz commented on code in PR #13238:
URL: https://github.com/apache/lucene/pull/13238#discussion_r1544270671


##########
lucene/MIGRATE.md:
##########
@@ -185,6 +185,34 @@ enum.
 
 `IOContext#LOAD` has been replaced with `IOContext#PRELOAD`.
 
+### IndexSearch#search(Query, Collector) being deprecated in favor of 
IndexSearcher#search(Query, CollectorManager) (LUCENE-10002)
+
+`IndexSearch#search(Query, Collector)` is now being deprecated in favor of 
`IndexSearcher#search(Query, CollectorManager)`,
+as `CollectorManager` implementation would allow taking advantage of 
intra-query concurrency via its map-reduce API design.
+To migrate, use a provided `CollectorManager` implementation that suits your 
use cases, or change your `Collector` implementation
+to follow the new API pattern. The straight forward approach would be to wrap 
the single-threaded `Collector` into a degenerate `CollectorManager`.

Review Comment:
   Not a native speaker, but the use of `degenerate` looks surprising to me in 
that context?



##########
lucene/MIGRATE.md:
##########
@@ -185,6 +185,34 @@ enum.
 
 `IOContext#LOAD` has been replaced with `IOContext#PRELOAD`.
 
+### IndexSearch#search(Query, Collector) being deprecated in favor of 
IndexSearcher#search(Query, CollectorManager) (LUCENE-10002)
+
+`IndexSearch#search(Query, Collector)` is now being deprecated in favor of 
`IndexSearcher#search(Query, CollectorManager)`,
+as `CollectorManager` implementation would allow taking advantage of 
intra-query concurrency via its map-reduce API design.
+To migrate, use a provided `CollectorManager` implementation that suits your 
use cases, or change your `Collector` implementation
+to follow the new API pattern. The straight forward approach would be to wrap 
the single-threaded `Collector` into a degenerate `CollectorManager`.
+
+For example
+```java
+public class WrappingCollectorManager implements 
CollectorManager<CustomCollector, List<Object>> {

Review Comment:
   nit: maybe call it `CustomCollectorManager` to align the name with the name 
of the collector?



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