Fix compilation issue
This commit is contained in:
parent
717d13ef1f
commit
d4ed99cc24
@ -241,7 +241,7 @@ public class LLLocalLuceneIndex implements LLLuceneIndex {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Mono<Void> addDocument(LLTerm key, LLDocument doc) {
|
public Mono<Void> addDocument(LLTerm key, LLDocument doc) {
|
||||||
return Mono.fromCallable(() -> {
|
return Mono.<Void>fromCallable(() -> {
|
||||||
activeTasks.register();
|
activeTasks.register();
|
||||||
try {
|
try {
|
||||||
//noinspection BlockingMethodInNonBlockingContext
|
//noinspection BlockingMethodInNonBlockingContext
|
||||||
@ -274,7 +274,7 @@ public class LLLocalLuceneIndex implements LLLuceneIndex {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Mono<Void> deleteDocument(LLTerm id) {
|
public Mono<Void> deleteDocument(LLTerm id) {
|
||||||
return Mono.fromCallable(() -> {
|
return Mono.<Void>fromCallable(() -> {
|
||||||
activeTasks.register();
|
activeTasks.register();
|
||||||
try {
|
try {
|
||||||
//noinspection BlockingMethodInNonBlockingContext
|
//noinspection BlockingMethodInNonBlockingContext
|
||||||
@ -288,7 +288,7 @@ public class LLLocalLuceneIndex implements LLLuceneIndex {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Mono<Void> updateDocument(LLTerm id, LLDocument document) {
|
public Mono<Void> updateDocument(LLTerm id, LLDocument document) {
|
||||||
return Mono.fromCallable(() -> {
|
return Mono.<Void>fromCallable(() -> {
|
||||||
activeTasks.register();
|
activeTasks.register();
|
||||||
try {
|
try {
|
||||||
//noinspection BlockingMethodInNonBlockingContext
|
//noinspection BlockingMethodInNonBlockingContext
|
||||||
@ -307,7 +307,7 @@ public class LLLocalLuceneIndex implements LLLuceneIndex {
|
|||||||
|
|
||||||
private Mono<Void> updateDocuments(Map<LLTerm, LLDocument> documentsMap) {
|
private Mono<Void> updateDocuments(Map<LLTerm, LLDocument> documentsMap) {
|
||||||
return Mono
|
return Mono
|
||||||
.fromCallable(() -> {
|
.<Void>fromCallable(() -> {
|
||||||
activeTasks.register();
|
activeTasks.register();
|
||||||
try {
|
try {
|
||||||
for (Entry<LLTerm, LLDocument> entry : documentsMap.entrySet()) {
|
for (Entry<LLTerm, LLDocument> entry : documentsMap.entrySet()) {
|
||||||
|
@ -69,6 +69,7 @@ import org.warp.commonutils.log.LoggerFactory;
|
|||||||
import reactor.core.publisher.Flux;
|
import reactor.core.publisher.Flux;
|
||||||
import reactor.core.publisher.Mono;
|
import reactor.core.publisher.Mono;
|
||||||
import reactor.core.scheduler.Scheduler;
|
import reactor.core.scheduler.Scheduler;
|
||||||
|
import reactor.core.scheduler.Schedulers;
|
||||||
|
|
||||||
public class LuceneUtils {
|
public class LuceneUtils {
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ class ScoredSimpleLuceneShardSearcher implements LuceneShardSearcher {
|
|||||||
Mono<Void> releaseIndexSearcher,
|
Mono<Void> releaseIndexSearcher,
|
||||||
LocalQueryParams queryParams,
|
LocalQueryParams queryParams,
|
||||||
Scheduler scheduler) {
|
Scheduler scheduler) {
|
||||||
return Mono.fromCallable(() -> {
|
return Mono.<Void>fromCallable(() -> {
|
||||||
if (Schedulers.isInNonBlockingThread()) {
|
if (Schedulers.isInNonBlockingThread()) {
|
||||||
throw new UnsupportedOperationException("Called searchOn in a nonblocking thread");
|
throw new UnsupportedOperationException("Called searchOn in a nonblocking thread");
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ class UnscoredPagedLuceneShardSearcher implements LuceneShardSearcher {
|
|||||||
Mono<Void> releaseIndexSearcher,
|
Mono<Void> releaseIndexSearcher,
|
||||||
LocalQueryParams queryParams,
|
LocalQueryParams queryParams,
|
||||||
Scheduler scheduler) {
|
Scheduler scheduler) {
|
||||||
return Mono.fromCallable(() -> {
|
return Mono.<Void>fromCallable(() -> {
|
||||||
if (Schedulers.isInNonBlockingThread()) {
|
if (Schedulers.isInNonBlockingThread()) {
|
||||||
throw new UnsupportedOperationException("Called searchOn in a nonblocking thread");
|
throw new UnsupportedOperationException("Called searchOn in a nonblocking thread");
|
||||||
}
|
}
|
||||||
|
@ -102,10 +102,11 @@ public class UnscoredUnsortedContinuousLuceneMultiSearcher implements LuceneMult
|
|||||||
LocalQueryParams queryParams,
|
LocalQueryParams queryParams,
|
||||||
Scheduler scheduler) {
|
Scheduler scheduler) {
|
||||||
return Mono
|
return Mono
|
||||||
.fromCallable(() -> {
|
.<Void>fromCallable(() -> {
|
||||||
if (Schedulers.isInNonBlockingThread()) {
|
if (Schedulers.isInNonBlockingThread()) {
|
||||||
throw new UnsupportedOperationException("Called searchOn in a nonblocking thread");
|
throw new UnsupportedOperationException("Called searchOn in a nonblocking thread");
|
||||||
}
|
}
|
||||||
|
//noinspection BlockingMethodInNonBlockingContext
|
||||||
var collector = cm.newCollector();
|
var collector = cm.newCollector();
|
||||||
int collectorShardIndex;
|
int collectorShardIndex;
|
||||||
synchronized (lock) {
|
synchronized (lock) {
|
||||||
|
Loading…
Reference in New Issue
Block a user