Full text search - Elasticsearch (v27.0.4/8.10.4) doesn't return results

Hey everyone,

I have elasticsearch 8.10.4 running on my server and the in the elasticsearch app (v27.0.4) is set to the same settings as the elasticsearch.yml. Nevertheless I am not able to get any search results by elasticsearch.
I indexed the files with “occ fulltextsearch:index” then I ran “occ fulltextsearch:test” and it crashed by trying to search the basic keywords:

root@xxx:# /opt/plesk/php/8.2/bin/php /var/www/vhosts/xxx/httpdocs/nextcloud/occ fulltextsearch:test

.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: 0, expected: ["simple"]) fail
Error detected, unlocking process ok
In Test.php line 676:
  Unexpected SearchResult: {"provider":{"id":"test_provider","name":"Test Provider"},"platform":{"id":"elastic_search","name":"Elasticsearch"},"documents":[],"info":[],"meta":{"timedOut":false,"time":1,"count":0,"total":0,"maxScore":0}}

Here is the info about elasticsearch:

root@xxx:/etc/elasticsearch# curl -X GET 'http://localhost:9200'
  "name" : "xxx",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "1xahDZqlSdCrRHTXRNH_Nw",
  "version" : {
    "number" : "8.10.4",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "b4a62ac808e886ff032700c391f45f1408b2538c",
    "build_date" : "2023-10-11T22:04:35.506990650Z",
    "build_snapshot" : false,
    "lucene_version" : "9.7.0",
    "minimum_wire_compatibility_version" : "7.17.0",
    "minimum_index_compatibility_version" : "7.0.0"
  "tagline" : "You Know, for Search"

Here is the status of elasticsearch.service

root@xxx:/etc/elasticsearch# systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
     Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: enabled)
     Active: active (running) since Wed 2023-10-25 11:46:41 CEST; 7s ago
       Docs: https://www.elastic.co
   Main PID: 3587892 (java)
     CGroup: /system.slice/elasticsearch.service
             ├─3587892 /usr/share/elasticsearch/jdk/bin/java -Xms4m -Xmx64m -XX:+UseSerialGC -Dcli.name=server -Dcli.script=/usr/share/elasticsearch/bin/elasticsearch -Dcli.libs=lib/tools/server-cli -Des.path.home=/usr/share/elasticsearch -Des.path.conf=/etc/elastics>             
             ├─3588031 /usr/share/elasticsearch/jdk/bin/java -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -Djava.security.manager=allow -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitS>             
             └─3588130 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller

 systemd[1]: Starting Elasticsearch...
 systemd-entrypoint[3587892]: Okt 25, 2023 11:46:22 AM sun.util.locale.provider.LocaleProviderAdapter <clinit>
 systemd-entrypoint[3587892]: WARNING: COMPAT locale provider will be removed in a future release
 systemd[1]: Started Elasticsearch.

Im running on Ubuntu 20.04.6 LTS, Nextcloud 27.1.2 with Full text search v27.0.2, Full text search - Elasticsearch Platform v27.0.4 and Full text search - Files v27.0.1.

I also tried to reinstall elasticsearch on the server, but that didn’t solve the problem. It worked on Ubuntu 18.04 and elasticsearch 7.17.14.

I am running out of ideas how to fix it and didn’t found any topic about it. Any help is apprechiated. Thank you! :blush:

Did you try to delete and reset the existing index?

1 Like

Oh that fixed it for me! Thank you! :smile:

Did run into the same issue with 27.1.4 now on two machines.

After reset test ist running be reindex does not. It just checks some files and stops then. There are no errors shown. Seems to be broken at the moment.