Update Local Lucene Index

This commit is contained in:
Andrea Cavalli 2021-03-01 00:29:59 +01:00
parent 36a0812237
commit 89f20b449b

View File

@ -314,12 +314,8 @@ public class LLLocalLuceneIndex implements LLLuceneIndex {
//noinspection BlockingMethodInNonBlockingContext //noinspection BlockingMethodInNonBlockingContext
indexWriter.deleteAll(); indexWriter.deleteAll();
//noinspection BlockingMethodInNonBlockingContext //noinspection BlockingMethodInNonBlockingContext
indexWriter.commit();
//noinspection BlockingMethodInNonBlockingContext
indexWriter.forceMergeDeletes(true); indexWriter.forceMergeDeletes(true);
//noinspection BlockingMethodInNonBlockingContext //noinspection BlockingMethodInNonBlockingContext
indexWriter.flush();
//noinspection BlockingMethodInNonBlockingContext
indexWriter.commit(); indexWriter.commit();
return null; return null;
}).subscribeOn(luceneBlockingScheduler); }).subscribeOn(luceneBlockingScheduler);
@ -680,8 +676,6 @@ public class LLLocalLuceneIndex implements LLLuceneIndex {
try { try {
//noinspection BlockingMethodInNonBlockingContext //noinspection BlockingMethodInNonBlockingContext
indexWriter.commit(); indexWriter.commit();
//noinspection BlockingMethodInNonBlockingContext
indexWriter.flush();
} finally { } finally {
scheduledTasksLifecycle.endScheduledTask(); scheduledTasksLifecycle.endScheduledTask();
} }