nextcloud / nextcloud/fulltextsearch

Indexing some files and users fails

Open
#403 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
234
Forks
64
Avg merge
6h 18m
Merged PRs (30d)
10

Description

Hi, I have a Nextcloud installation with more or less 2K user and 400k files, I'm trying to implement the fulltexsearch functionality, but when I try to index the content and always in the same user and the same file I have this error:
sudo -u apache /usr/bin/php /var/www/html/nextcloud/occ fulltextsearch:index

Error: Call to a member function instanceOfStorage() on null in /var/www/html/nextcloud/lib/private/Files/View.php:1919
Stack trace:
#0 /var/www/html/nextcloud/lib/private/Files/View.php(2033): OC\Files\View->lockPath('/user1', 1, false)
#1 /var/www/html/nextcloud/lib/private/Files/View.php(1132): OC\Files\View->lockFile('/user1', 1)
#2 /var/www/html/nextcloud/lib/private/Files/View.php(268): OC\Files\View->basicOperation('mkdir', '/user1', Array)
#3 /var/www/html/nextcloud/lib/private/Files/Node/Folder.php(160): OC\Files\View->mkdir('/user1')
#4 /var/www/html/nextcloud/lib/private/Files/Node/Root.php(380): OC\Files\Node\Folder->newFolder('/user1')
#5 [internal function]: OC\Files\Node\Root->getUserFolder('user')

[...]

Nextcloud: 14.0.3
Apache: Apache/2.4.6
O.S.: CentOS Linux release 7.5.1804 (Core)
PHP 7.1.23

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the occ fulltextsearch:index command and tracing the stack through lib/private/Files/View.php, lib/private/Files/Node/Folder.php, and lib/private/Files/Node/Root.php. Compare the failing user and file with the storage state shown by the trace. Done means indexing completes for the affected user and file without the instanceOfStorage() error.

Written by the indexing model from the issue text.

Assessment

Tech stack
apache, php
Domain
backend, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.