nextcloud / fulltextsearch_elasticsearch

🔍 Use Elasticsearch to index the content of your Nextcloud
https://apps.nextcloud.com/apps/fulltextsearch_elasticsearch
GNU Affero General Public License v3.0
82 stars 32 forks source link

Index Mapping Service fails #131

Open glhoste opened 3 years ago

glhoste commented 3 years ago

Hi, I just installed FullTextSearch app (inc. bookmarks, Elasticsearch, files, tesseract) on the latest version of NC (20.0.5). While indexing for the first time (occ fulltextsearch:index), I get the following error. fulltextsearch:test raises no error. My system : Ubuntu 18.04, PHP7.4, Apache

An unhandled exception has been thrown: TypeError: Return value of OCA\FullTextSearch_Elasticsearch\Service\IndexMappingService::indexDocumentNew() must be of the type array, string returned in /var/www/cloud/apps/fulltextsearch_elasticsearch/lib/Service/IndexMappingService.php:89 Stack trace:

0 /var/www/cloud/apps/fulltextsearch_elasticsearch/lib/Service/IndexService.php(197): OCA\FullTextSearch_Elasticsearch\Service\IndexMappingService->indexDocumentNew()

1 /var/www/cloud/apps/fulltextsearch_elasticsearch/lib/Platform/ElasticSearchPlatform.php(222): OCA\FullTextSearch_Elasticsearch\Service\IndexService->indexDocument()

2 /var/www/cloud/apps/fulltextsearch/lib/Service/IndexService.php(375): OCA\FullTextSearch_Elasticsearch\Platform\ElasticSearchPlatform->indexDocument()

3 /var/www/cloud/apps/fulltextsearch/lib/Service/IndexService.php(326): OCA\FullTextSearch\Service\IndexService->indexDocument()

4 /var/www/cloud/apps/fulltextsearch/lib/Service/IndexService.php(204): OCA\FullTextSearch\Service\IndexService->indexDocuments()

5 /var/www/cloud/apps/fulltextsearch/lib/Command/Index.php(410): OCA\FullTextSearch\Service\IndexService->indexProviderContentFromUser()

6 /var/www/cloud/apps/fulltextsearch/lib/Command/Index.php(273): OCA\FullTextSearch\Command\Index->indexProvider()

7 /var/www/cloud/3rdparty/symfony/console/Command/Command.php(255): OCA\FullTextSearch\Command\Index->execute()

8 /var/www/cloud/core/Command/Base.php(169): Symfony\Component\Console\Command\Command->run()

9 /var/www/cloud/3rdparty/symfony/console/Application.php(1000): OC\Core\Command\Base->run()

10 /var/www/cloud/3rdparty/symfony/console/Application.php(271): Symfony\Component\Console\Application->doRunCommand()

11 /var/www/cloud/3rdparty/symfony/console/Application.php(147): Symfony\Component\Console\Application->doRun()

12 /var/www/cloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()

13 /var/www/cloud/console.php(100): OC\Console\Application->run()

14 /var/www/cloud/occ(11): require_once('/var/www/cloud/...')

Many thanks, Guillaume

bjo81 commented 3 years ago

Did you check for elasticsearch errors in its logs? In my case, the issue seems to have been caused by too small heap size setting for elasticsearch, which crashed then with out of memory.