Remove publishOn on lucene functions
This commit is contained in:
parent
1f672a63ef
commit
d6f9398eff
@ -411,8 +411,7 @@ public class LuceneUtils {
|
||||
if (preserveOrder) {
|
||||
return hitsFlux
|
||||
.publishOn(LuceneUtils.luceneScheduler())
|
||||
.mapNotNull(hit -> mapHitBlocking(hit, indexSearchers, keyFieldName))
|
||||
.publishOn(Schedulers.parallel());
|
||||
.mapNotNull(hit -> mapHitBlocking(hit, indexSearchers, keyFieldName));
|
||||
} else {
|
||||
return hitsFlux
|
||||
.buffer(Queues.XS_BUFFER_SIZE, () -> new ArrayList<Object>(Queues.XS_BUFFER_SIZE))
|
||||
@ -434,8 +433,7 @@ public class LuceneUtils {
|
||||
return (List<LLKeyScore>) (List<?>) shardHits;
|
||||
}
|
||||
}).subscribeOn(luceneScheduler()))
|
||||
.flatMapIterable(a -> a)
|
||||
.publishOn(Schedulers.parallel());
|
||||
.flatMapIterable(a -> a);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,6 @@ public class CountMultiSearcher implements MultiSearcher {
|
||||
LLUtils.ensureBlocking();
|
||||
return (long) indexSearcher.getIndexSearcher().count(queryParams.query());
|
||||
}).subscribeOn(luceneScheduler()), LLUtils::finalizeResource)
|
||||
.publishOn(Schedulers.parallel())
|
||||
.transform(TimeoutUtil.timeoutMono(queryParams.timeout()))
|
||||
.map(count -> new LuceneSearchResult(TotalHitsCount.of(count, true), Flux.empty()));
|
||||
}
|
||||
|
@ -61,8 +61,7 @@ public class DecimalBucketMultiSearcher {
|
||||
return cmm.search(shard);
|
||||
}).subscribeOn(luceneScheduler()))
|
||||
.collectList()
|
||||
.flatMap(results -> Mono.fromSupplier(() -> cmm.reduce(results)).subscribeOn(luceneScheduler()))
|
||||
.publishOn(Schedulers.parallel());
|
||||
.flatMap(results -> Mono.fromSupplier(() -> cmm.reduce(results)).subscribeOn(luceneScheduler()));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -67,8 +67,7 @@ public class LuceneGenerator implements Supplier<ScoreDoc> {
|
||||
return s;
|
||||
}
|
||||
)
|
||||
.subscribeOn(SCHED)
|
||||
.publishOn(Schedulers.parallel());
|
||||
.subscribeOn(SCHED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -94,8 +94,7 @@ public class SortedScoredFullMultiSearcher implements MultiSearcher {
|
||||
throw ex;
|
||||
}
|
||||
}).subscribeOn(luceneScheduler()))
|
||||
)
|
||||
.publishOn(Schedulers.parallel());
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -106,8 +106,7 @@ public class StandardSearcher implements MultiSearcher {
|
||||
}
|
||||
return TopDocs.merge(0, queryParams.limitInt(), topDocs);
|
||||
}
|
||||
}).subscribeOn(luceneScheduler())))
|
||||
.publishOn(Schedulers.parallel());
|
||||
}).subscribeOn(luceneScheduler())));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user