diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2018-10-21 18:32:25 +0300 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2018-10-21 18:32:25 +0300 |
commit | 5d7563d1a0bcf1c6dc7ba3320824efa1fe624b4c (patch) | |
tree | 85f0aaab45ad96af07627f69b7a0601eb65c66fb /lib | |
parent | 78a7fbe6d453e0355ee393465db33a1ad7d6b4d8 (diff) | |
parent | 524dd6297c87b249803851b1a76a2eb15dea5b48 (diff) |
Merge branch 'stable14'
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Service/IndexService.php | 11 |
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) { |