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