Remove publishOn in lucene utils

This commit is contained in:
Andrea Cavalli 2021-10-07 00:54:11 +02:00
parent 33e4cb2f14
commit 013e4c5dd8

View File

@ -364,7 +364,6 @@ public class LuceneUtils {
boolean preserveOrder) {
if (preserveOrder) {
return hitsFlux
.publishOn(Schedulers.boundedElastic())
.mapNotNull(hit -> mapHitBlocking(hit, indexSearchers, keyFieldName));
} else {
// Compute parallelism
@ -375,7 +374,6 @@ public class LuceneUtils {
return hitsFlux
.groupBy(hit -> hit.shardIndex % maxParallelGroups) // Max n groups
.flatMap(shardHits -> shardHits
.publishOn(Schedulers.boundedElastic())
.mapNotNull(hit -> mapHitBlocking(hit, indexSearchers, keyFieldName)),
maxParallelGroups // Max n concurrency. Concurrency must be >= total groups count
);