Full Text Search Finds No Files On Local External Storage

Nextcloud version (eg, 12.0.2): 17.0
Operating system and version (eg, Ubuntu 17.04): 18.04.3
Apache or nginx version (eg, Apache 2.4.25): 2.4.29
PHP version (eg, 7.1): 7.2

The issue you are facing:

Full text search finds none of my files in ‘external’ storage. It does find files in local storage.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  • I mounted local external storage as the folder ‘documents’.
  • I added 8000+ files to my ‘documents’ folder (not using Nextcloud).
  • I installed and configured Elastic Search, Full text search, Full text search - Elasticsearch Platform, Full text search - Files.
    • Address of the servlet = http://localhost:9200
    • Index = nextcloud
    • External Files = Index path and content
  • I ran occ fulltextsearch:index and waited for it to complete.
  • Search finds no documents.

The document ARE indexed:

  • Running curl -XGET 'localhost:9200/nextcloud/_search?q=kevin&pretty' finds lots of documents.

Search works for documents in internal storage but not external storage:

  • I uploaded a file to my Nextcloud home folder in the browser, and search can find it.
  • I uploaded a file to my external ‘documents’ folder, and search cannot find it.

The output of your Nextcloud log in Admin > Logging:

No server logs
Everything is working fine

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'trusted_domains' =>
  array (
    0 => 'private1',
    1 => 'private2',
  ),
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'trusted_proxies' =>
  array (
    0 => '192.168.1.1',
    1 => '192.168.1.10',
    2 => '127.0.0.1',
  ),
  'overwriteprotocol' => 'https',
  'overwritewebroot' => '',
  'overwritecondaddr' => '^192.168.1.10$',
  'forwarded_for_headers' =>
  array (
    0 => 'HTTP_X_FORWARDED_FOR',
  ),
  'onlyoffice' =>
  array (
    'verify_peer_off' => true,
  ),
  'session_lifetime' => 21600,
  'instanceid' => '12345',
  'passwordsalt' => '12345',
  'secret' => '23456',
  'datadirectory' => '/var/www/html/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '17.0.0.9',
  'overwrite.cli.url' => 'http://boxtop',
  'dbname' => 'nextcloud',
  'dbhost' => '127.0.0.1:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'private3',
  'dbpassword' => 'private4',
  'installed' => true,
  'maintenance' => false,
  'app_install_overwrite' =>
array (
    0 => 'onlyoffice',
    1 => 'files_clipboard',
    2 => 'files_external_gdrive',
  ),
  'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' =>
  array (
  ),
  'twofactor_enforced_excluded_groups' =>
  array (
  ),
  'mail_from_address' => 'email_relay',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'example.com',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.gmail.com',
  'mail_smtpport' => '587',
  'mail_smtpname' => 'private@example.com',
  'mail_smtppassword' => 'veryprivate',
  'mail_smtpsecure' => 'tls',
);

The output of your Apache/nginx/system log in /var/log/____:

[Sun Oct 27 15:53:23.538862 2019] [core:warn] [pid 37:tid 140614242167744] AH00098: pid file /var/run/apache2/apache2.pid overwritten -- Unclean shutdown of previous Apache run?
[Sun Oct 27 15:53:23.538961 2019] [:notice] [pid 39:tid 140614242167744] FastCGI: process manager initialized (pid 39)
[Sun Oct 27 15:53:23.539608 2019] [mpm_event:notice] [pid 37:tid 140614242167744] AH00489: Apache/2.4.29 (Ubuntu) mod_fastcgi/mod_fastcgi-SNAP-0910052141 configured -- resuming normal operations
[Sun Oct 27 15:53:23.539648 2019] [core:notice] [pid 37:tid 140614242167744] AH00094: Command line: '/usr/sbin/apache2'
1 Like

Search via Nextcloud 16 doesn’t display results from external local storage either. Manually running curl finds the results, but they just aren’t displayed by the user interface.

Everything else I need seems to work, but no full text search of local external storage is going to be a deal killer. :frowning:

Facing the same issue.

I have nextcloud (17.0.1) and ES (7.5.0) setup with docker.

Mounted External Storage (local).

Curl command results with files on the external source, but the gui displays no results

1 Like

I have the same issue on fresh nextcloud 18 install with full text seach in elastic search. I can find the keywords directly using curl -XGET 'localhost:9200/nextcloud/_search?q=kevin&pretty but not using the searchboxes in nextcloud.

Do they fix this if you take a support contract? I think it’s bizar that this issue does not get resolved.

UPDATE: https://github.com/nextcloud/fulltextsearch_elasticsearch/pull/100
@rp1226 @kleinfelter this fix works for me!