How to troubleshoot Full Text Search

I am having some real grief with Full Text Search. I am not sure when it stopped working as I don’t use it that often.

I am looking for advice on how to troubleshoot the issue.

I am running Nextcloud Hub 5 (27.0.1) and I have an Elasticsearch 7.17.12 (http, no security, username or password) cluster on Debian 12.

I have

Removed the apps
Stopped the index
Reset the index
Backed up the database
Dropped the database tables


  • drop table oc_fulltextsearch_index;
  • drop table oc_fulltextsearch_ticks;


  • delete from oc_appconfig where appid=‘fulltextsearch’;
  • delete from oc_appconfig where appid=‘fulltextsearch_elasticsearch’;
  • delete from oc_appconfig where appid=‘files_fulltextsearch’;
  • delete from oc_appconfig where appid=‘files_fulltextsearch_tesseract’;
  • delete FROM oc_migrations WHERE app=‘fulltextsearch’;
  • delete FROM oc_preferences WHERE appid=‘fulltextsearch’;

Reinstalled the apps

Run the following commands as www-data

  • php occ fulltextsearch:index
  • php occ fulltextsearch:test

My test outputs the following.

.Testing your current setup:  
Creating mocked content provider. ok  
Testing mocked provider: get indexable documents. (2 items) ok  
Loading search platform. (Elasticsearch) 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

I can see a healthy index.

health status index            uuid                   pri rep docs.count docs.deleted store.size
green  open   .geoip_databases 1gc1gt3tQeCDOmPd1JGSUw   1   1         42           42     78.9mb         39.4mb
green  open   nextcloud        Sc-u4Z8LSwmiFvxDYXoZiA   1   1      15435          513      5.5mb          2.7mb

When I search in the application all I get is the following.

the search in Files for "motherboard" returned 0 results in 164 ms

Where can I look for further clues as to the problem?

Since Nextcloud 26, the fulltextsearch app is using the Elasticsearch Client library v 8.6.1, which makes it incompatible with any Elasticsearch 7.x server. Unfortunately, this is not visibly documented in Nextcloud when you install/upgrade the fulltextsearch app :frowning: only a search on github reveals that crucial fact.

Long story short: you have to rebuild your index. I wish you good luck (and a lot of patience :wink: )

EDIT: I accidentally did not say: you have to upgrade your ElasticSearch first, the currently latest version is 8.10.0 on Debian Bookworm

EDIT2: to keep your setup ( you have to disable the SSL-enforcing settings which were introduced in 8.x in the elasticsearch.yml file.