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
81 stars 30 forks source link

fulltextsearch not indexing with php8.0 #136

Closed martin-77 closed 3 years ago

martin-77 commented 3 years ago

Hi there,

first my config: Nextcloud Version: 21 (latest stable) PHP: 8.0.2

Fulltestsearch starts indexing, but scans only "deck". Running php8.0 occ fulltextsearch:test:

root@Nextcloud:/var/www/nextcloud# sudo -u www-data php8.0 occ fulltextsearch:test

.Testing your current setup:
Creating mocked content provider. ok
Testing mocked provider: get indexable documents. PHP Warning:  Private methods cannot be final as they are never overridden by other classes in /var/www/nextcloud/lib/private/FullTextSearch/Model/IndexDocument.php on line 725
(2 items) ok
Testing search platform. ok
Locking process ok
Removing test. ok
Pausing 3 seconds 1 2 3 ok
Initializing index mapping. ok
Indexing generated documents. ok
Pausing 3 seconds 1 2 3 ok
Retreiving content from a big index (license). (size: 32386) ok
Comparing document with source. ok
Searching basic keywords:
 - 'test' (result: 1, expected: ["simple"]) ok
 - 'document is a simple test' (result: 2, expected: ["simple","license"]) ok
 - '"document is a test"' (result: 0, expected: []) ok
 - '"document is a simple test"' (result: 1, expected: ["simple"]) ok
 - 'document is a simple -test' (result: 1, expected: ["license"]) ok
 - 'document is a simple +test' (result: 1, expected: ["simple"]) ok
 - '-document is a simple test' (result: 0, expected: []) ok
 - 'document is a simple +test +testing' (result: 1, expected: ["simple"]) ok
 - 'document is a simple +test -testing' (result: 0, expected: []) ok
 - 'document is a +simple -test -testing' (result: 0, expected: []) ok
 - '+document is a simple -test -testing' (result: 1, expected: ["license"]) ok
 - 'document is a +simple -license +testing' (result: 1, expected: ["simple"]) ok
Updating documents access. ok
Pausing 3 seconds 1 2 3 ok
Searching with group access rights:
 - 'license' - [] -  (result: 0, expected: []) ok
 - 'license' - ["group_1"] -  (result: 1, expected: ["license"]) ok
 - 'license' - ["group_1","group_2"] -  (result: 1, expected: ["license"]) ok
 - 'license' - ["group_3","group_2"] -  (result: 1, expected: ["license"]) ok
 - 'license' - ["group_3"] -  (result: 0, expected: []) ok
Searching with share rights:
 - 'license' - notuser -  (result: 0, expected: []) ok
 - 'license' - user2 -  (result: 1, expected: ["license"]) ok
 - 'license' - user3 -  (result: 1, expected: ["license"]) ok
Removing test. ok
Unlocking process ok

Running php7.4 occ fulltextsearch:test: no errors

Running manual index of files by php7.4 occ fulltextsearch:index starts a normal scan, but with this workaround, the regular Nextcloud cron job will not update the files.

At this time, I have no idea, how to fix this.

Hopefully, anyone of you has an idea!

Greatings and thanks for this wonderfull addon!

Martin

bjo81 commented 3 years ago

Does the fulltextsearch find something after the manual indexing?

tiredofit commented 3 years ago

Can confirm that PHP 8.0 does not perform index. While it walks through the Top level folder structure it does not index. When I switch over to PHP 7.4 Indexing occurs normally.

jscottbranson commented 3 years ago

I can confirm this also impacted me (test completes w/o errors, then only the deck is indexed).

Specifying PHP 7.x also fixed the issue for me, though new files aren't added via cron.

I really appreciate the work everyone puts into this - I can't tell you all how much more efficient my life is thanks to you all!!!!

~Scott

fwolfst commented 3 years ago

Maybe you have to clear the index first?

I upgraded to 21 and php8 and only afterwards installed the fulltext engine (was never installed before). The update process starts just fine and I see files being indexed, but I run into errors after a while (most likely a unrelated issue).

Update I can now confirm that indexing works and files are found if using the "global navigation entry" (i.e. not the small search box top right). I believe the issue should be closed or filled with more information.

martin-77 commented 3 years ago

Check, now it works with php8, I think fulltextsearch did an update which solved my problem.

Thanks for this great Software