Set concurrency to 3

This commit is contained in:
Andrea Cavalli 2021-09-10 00:05:39 +02:00
parent c47f45076a
commit 36dde3bb5a
2 changed files with 4 additions and 7 deletions

View File

@ -374,13 +374,13 @@ public class LuceneUtils {
return hitsFlux.flatMapSequential(hit -> Mono
.fromCallable(() -> mapHitBlocking(hit, indexSearchers, keyFieldName))
.subscribeOn(scheduler),
2
3
);
} else {
return hitsFlux.flatMap(hit -> Mono
.fromCallable(() -> mapHitBlocking(hit, indexSearchers, keyFieldName))
.subscribeOn(scheduler),
2
3
);
}
});

View File

@ -150,11 +150,8 @@ class ScoredSimpleLuceneShardSearcher implements LuceneShardSearcher {
return flux;
}
})
.flatMapSequential(topFieldDoc -> LuceneUtils
.convertHits(Flux.fromArray(topFieldDoc.scoreDocs), indexSearchers,
keyFieldName, collectorScheduler, true),
2
);
.flatMapSequential(topFieldDoc -> LuceneUtils.convertHits(Flux.fromArray(topFieldDoc.scoreDocs),
indexSearchers, keyFieldName, collectorScheduler, true), 3);
return new LuceneSearchResult(LuceneUtils.convertTotalHitsCount(result.totalHits),
firstPageHits