Skip to content

Commit

Permalink
add search within parts.ocr
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtificialOwl committed Feb 12, 2019
1 parent 1b48e37 commit 5a0628a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Service/TesseractService.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
use OCP\Files\NotFoundException;
use OCP\Files_FullTextSearch\Model\AFilesDocument;
use OCP\FullTextSearch\Model\IndexDocument;
use OCP\FullTextSearch\Model\ISearchRequest;
use Spatie\PdfToImage\Exceptions\PageDoesNotExist;
use Spatie\PdfToImage\Pdf;
use Symfony\Component\EventDispatcher\GenericEvent;
Expand Down Expand Up @@ -122,6 +123,9 @@ public function onFileIndexing(GenericEvent $e) {
* @param GenericEvent $e
*/
public function onSearchRequest(GenericEvent $e) {
/** @var ISearchRequest $file */
$request = $e->getArgument('request');
$request->addPart('ocr');
}


Expand Down

0 comments on commit 5a0628a

Please sign in to comment.