fix crash
This commit is contained in:
parent
1c02a601bc
commit
67d3797df8
@ -793,15 +793,12 @@ public class LuceneUtils {
|
|||||||
LocalQueryParams queryParams,
|
LocalQueryParams queryParams,
|
||||||
String keyFieldName,
|
String keyFieldName,
|
||||||
GlobalQueryRewrite transformer) {
|
GlobalQueryRewrite transformer) {
|
||||||
return Mono.usingWhen(indexSearcherMono, indexSearcher -> {
|
return Mono.usingWhen(indexSearcherMono.map(LLIndexSearchers::unsharded), indexSearchers -> Mono
|
||||||
try (UnshardedIndexSearchers indexSearchers = LLIndexSearchers.unsharded(indexSearcher)) {
|
.fromCallable(() -> transformer.rewrite(indexSearchers, queryParams))
|
||||||
return Mono
|
.transform(LuceneUtils::scheduleLucene)
|
||||||
.fromCallable(() -> transformer.rewrite(indexSearchers, queryParams))
|
.flatMap(queryParams2 ->
|
||||||
.transform(LuceneUtils::scheduleLucene)
|
localSearcher.collect(indexSearcherMono, queryParams2, keyFieldName, NO_REWRITE)),
|
||||||
.flatMap(queryParams2 ->
|
LLUtils::finalizeResource);
|
||||||
localSearcher.collect(indexSearcherMono, queryParams2, keyFieldName, NO_REWRITE));
|
|
||||||
}
|
|
||||||
}, LLUtils::finalizeResource);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user