Search not working after upgrade to NC15

Hi.

yesterday i upgraded my NC14 to NC15. After that i cannot perfomr a search. I can insert a search but nothing happends.

I remove the fulltextseach Apps, recreate the Index (reset and index without errors), install the fulltextseach apps but that doesn’t solve my problem.

Any Ideas?

Regards
Hermann

Same here:

Options: {“user”:“aegt”}
Memory: 26 MB
┌─ Indexing  ────
│ Action: fillDocument
│ Provider: Files                Account: aegt
│ Document: 34033
│ Info: httpd/unix-directory
│ Title:  
│ Content size:  
│ Progress:    336/7227
└──
┌─ Results ────
│ Result:    336/336
│ Index: files:36943
│ Status: ok
│ Message: {"_index":“aegt”,"_type":“standard”,"_id":“files:36943”,"_version":1,“result”:“created”,"_shards":{“total”:2,“successful”:1,“failed”:0},"_seq_no":68,"_primary_term":1}An unhandled except
ion has been thrown:
TypeError: Return value of OCP\FullTextSearch\Model\IndexDocument::getAccess() must be an instance of OCP\FullTextSearch\Model\DocumentAccess, null returned in /var/www/nextcloud/lib/public/FullTex
tSearch/Model/IndexDocument.php:252
Stack trace:
#0 /var/www/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(341): OCP\FullTextSearch\Model\IndexDocument->getAccess()
#1 /var/www/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(319): OCA\FullTextSearch\Service\IndexService->filterDocumentBeforeIndex(Object(OCA\Files_FullTextSearch\Model\FilesDocument))
#2 /var/www/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(192): OCA\FullTextSearch\Service\IndexService->indexDocuments(Object(OCA\FullTextSearch_ElasticSearch\Platform\ElasticSearchPl
atform), Object(OCA\Files_FullTextSearch\Provider\FilesProvider), Array, Object(OCA\FullTextSearch\Model\IndexOptions))
#3 /var/www/nextcloud/apps/fulltextsearch/lib/Command/Index.php(407): OCA\FullTextSearch\Service\IndexService->indexProviderContentFromUser(Object(OCA\FullTextSearch_ElasticSearch\Platform\ElasticS
earchPlatform), Object(OCA\Files_FullTextSearch\Provider\FilesProvider), ‘aegt’, Object(OCA\FullTextSearch\Model\IndexOptions))
#4 /var/www/nextcloud/apps/fulltextsearch/lib/Command/Index.php(271): OCA\FullTextSearch\Command\Index->indexProvider(Object(OCA\Files_FullTextSearch\Provider\FilesProvider), Object(OCA\FullTextSea
rch\Model\IndexOptions))
#5 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\FullTextSearch\Command\Index->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Consol
e\Output\ConsoleOutput))
#6 /var/www/nextcloud/core/Command/Base.php(166): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOu
tput))
#7 /var/www/nextcloud/3rdparty/symfony/console/Application.php(946): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutp
ut))
#8 /var/www/nextcloud/3rdparty/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(OCA\FullTextSearch\Command\Index), Object(Symfony\Component\Console\I
nput\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/nextcloud/3rdparty/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console
\Output\ConsoleOutput))
#10 /var/www/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Outpu
t\ConsoleOutput))
#11 /var/www/nextcloud/console.php(96): OC\Console\Application->run()
#12 /var/www/nextcloud/occ(11): require_once(’/var/www/nextcl…’)

nextcloud 15.0.0 - elasticsearch 6.5.3 - php72

Error PHP filter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated at /var/www/nextcloud/apps/fulltextsearch_elasticsearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ClientBuilder.php#686 2018-12-12T16:31:56+0100
Error PHP filter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated at /var/www/nextcloud/apps/fulltextsearch_elasticsearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ClientBuilder.php#686 2018-12-12T16:31:54+0100
Error PHP filter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated at /var/www/nextcloud/apps/fulltextsearch_elasticsearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ClientBuilder.php#686 2018-12-12T16:31:31+0100
Error PHP filter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated at /var/www/nextcloud/apps/fulltextsearch_elasticsearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ClientBuilder.php#686 2018-12-12T16:30:40+0100
Error PHP filter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated at /var/www/nextcloud/apps/fulltextsearch_elasticsearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ClientBuilder.php#686 2018-12-12T16:30:36+0100
Error PHP Undefined offset: 1 at /var/www/nextcloud/apps/admin_audit/lib/Actions/Console.php#33 2018-12-12T16:30:21+0100

Hey,

same Problem here.

  • PHP: PHP 7.2.13-1+0~20181207100540.13+stretch~1.gbpf57305
  • Nextcloud: 15.0.0.10
  • Full text search: 1.2.1
  • Full text search - Elasticsearch Platform: 1.2.1
  • Full text search - Files: 1.2.1
  • Elastic Search (docker): 6.2.4

When executing php occ fulltextsearch:index the script returns the following error after some time:

Memory: 38 MB
┌─ Indexing  ────
│ Action: fillDocument
│ Provider: Files                Account: <removed>
│ Document: 3967
│ Info: httpd/unix-directory
│ Title: Dokumente
│ Content size: 0
│ Progress:   9778/9927
└──
┌─ Results ────
│ Result:      0/0
│ Index: 
│ Status: 
│ Message: 
│ 
│ 
└──
┌─ Errors ────
│ Error:     37/37
│ Index: files:827725
│ Exception: Elasticsearch\Common\Exceptions\ServerErrorResponseException
│ Message: java.lang.IllegalArgumentException: ElasticsearchParseException[Error parsing document in field [content]]; nested: EncryptedDocumentException[Unable to process: document is encrypted]; nes
│ ted: InvalidPasswordException[Cannot decrypt PDF, the password is incorrect];
│ 
└──
## x:first result ## c/v:prec/next result ## b:last result
## f:first error ## h/j:prec/next error ## d:delete error ## l:last error
## q:quit ## p:pause 
An unhandled exception has been thrown:
TypeError: Return value of OCP\FullTextSearch\Model\IndexDocument::getAccess() must be an instance of OCP\FullTextSearch\Model\DocumentAccess, null returned in /var/www/nextcloud/htdocs/lib/public/FullTextSearch/Model/IndexDocument.php:252
Stack trace:
#0 /var/www/nextcloud/htdocs/apps/fulltextsearch/lib/Service/IndexService.php(341): OCP\FullTextSearch\Model\IndexDocument->getAccess()
#1 /var/www/nextcloud/htdocs/apps/fulltextsearch/lib/Service/IndexService.php(319): OCA\FullTextSearch\Service\IndexService->filterDocumentBeforeIndex(Object(OCA\Files_FullTextSearch\Model\FilesDocument))
#2 /var/www/nextcloud/htdocs/apps/fulltextsearch/lib/Service/IndexService.php(192): OCA\FullTextSearch\Service\IndexService->indexDocuments(Object(OCA\FullTextSearch_ElasticSearch\Platform\ElasticSearchPlatform), Object(OCA\Files_FullTextSearch\Provider\FilesProvider), Array, Object(OCA\FullTextSearch\Model\IndexOptions))
#3 /var/www/nextcloud/htdocs/apps/fulltextsearch/lib/Command/Index.php(407): OCA\FullTextSearch\Service\IndexService->indexProviderContentFromUser(Object(OCA\FullTextSearch_ElasticSearch\Platform\ElasticSearchPlatform), Object(OCA\Files_FullTextSearch\Provider\FilesProvider), '<removed>', Object(OCA\FullTextSearch\Model\IndexOptions))
#4 /var/www/nextcloud/htdocs/apps/fulltextsearch/lib/Command/Index.php(271): OCA\FullTextSearch\Command\Index->indexProvider(Object(OCA\Files_FullTextSearch\Provider\FilesProvider), Object(OCA\FullTextSearch\Model\IndexOptions))
#5 /var/www/nextcloud/htdocs/3rdparty/symfony/console/Command/Command.php(255): OCA\FullTextSearch\Command\Index->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/nextcloud/htdocs/core/Command/Base.php(166): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/nextcloud/htdocs/3rdparty/symfony/console/Application.php(946): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/nextcloud/htdocs/3rdparty/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(OCA\FullTextSearch\Command\Index), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/nextcloud/htdocs/3rdparty/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/nextcloud/htdocs/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/nextcloud/htdocs/console.php(96): OC\Console\Application->run()
#12 /var/www/nextcloud/htdocs/occ(11): require_once('/var/www/nextcl...')

As said in the error: you’re trying to index an encrypted PDF. As of today, there is no way for files_fulltextsearch to extract content from protected PDF.

This error-message ist a bit of missleading at this postion. The message InvalidPasswordException appears pretty early, but the indexing goes on.
But at some point the index-process stops with this unhandled exception error and won’t go on.
Is there a way to debug the file index? I tried to increase the log-level in the config.php, but i don’t get any further information in the nextcloud-log.

Full text search: 1.2.2 just got released which solved my problem. Great, thank you very much! :smiley:

1 Like

@andrem1987 can you create a bug report on https://github.com/nextcloud/fulltextsearch/issues about this ? It should not break the index but just add a message to the error list and go on to the next file.

Update 1.2.3 fixed the issues for me