From e12e240487bafb2ea2a7a116ecfed3a0834ad8b1 Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Wed, 8 Sep 2021 21:35:04 +0200 Subject: [PATCH] Subscribe on the same thread --- .../lucene/searcher/ScoredSimpleLuceneShardSearcher.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/it/cavallium/dbengine/lucene/searcher/ScoredSimpleLuceneShardSearcher.java b/src/main/java/it/cavallium/dbengine/lucene/searcher/ScoredSimpleLuceneShardSearcher.java index bf4e776..f504a88 100644 --- a/src/main/java/it/cavallium/dbengine/lucene/searcher/ScoredSimpleLuceneShardSearcher.java +++ b/src/main/java/it/cavallium/dbengine/lucene/searcher/ScoredSimpleLuceneShardSearcher.java @@ -149,6 +149,7 @@ class ScoredSimpleLuceneShardSearcher implements LuceneShardSearcher { }) .single() .takeUntilOther(cancelEvent.asMono()) + .subscribeOn(Schedulers.immediate()) .block(); if (!emitter.isCancelled()) { Objects.requireNonNull(pageTopDocs);