Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/fulltextsearch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2018-10-20 13:39:02 +0300
committerMaxence Lange <maxence@artificial-owl.com>2018-10-20 13:39:02 +0300
commitbec1fc6214a486f18df2c7ad516d74a353443420 (patch)
treea0798597eae71685ca6e803692aa76cdce0782f2 /lib
parentf71f193e07e387e3cb4326a8655d83bb900fc7c5 (diff)
display process advancement during compareWithCurrentIndex
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Service/IndexService.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/Service/IndexService.php b/lib/Service/IndexService.php
index d54bc24..85564cb 100644
--- a/lib/Service/IndexService.php
+++ b/lib/Service/IndexService.php
@@ -183,8 +183,7 @@ class IndexService {
* @param IndexOptions $options
*
* @return IndexDocument[]
- * @throws InterruptException
- * @throws TickDoesNotExistException
+ * @throws Exception
*/
private function updateDocumentsWithCurrIndex(
IFullTextSearchProvider $provider, array $documents, IndexOptions $options
@@ -192,8 +191,14 @@ class IndexService {
$currIndex = $this->getProviderIndexFromProvider($provider);
$result = [];
+ $count = 0;
foreach ($documents as $document) {
- $this->updateRunnerAction('compareWithCurrentIndex');
+
+ if ($count % 1000 === 0) {
+ $this->updateRunnerAction('compareWithCurrentIndex', true);
+ $this->updateRunnerInfo('documentCurrent', $count);
+ }
+ $count++;
$index = $currIndex->getIndex($document->getId());
if ($index === null) {