Keep elastic search indexing live using snap

Hello

I installed nextcloud 20 under Ubuntu 20 LTS using snap

I installed elastic search for full text search

I indexed all the content, works fine

If I add a new file it is not indexed unless I launch the command

sudo nextcloud.occ fulltextsearch:live --no-readline

How to keep this running automatically at server boots ?

I read the index is updated automatically with nextcloud cron but nothing happen

somethin to add in crontab ?
where are these crontab ? (nothing found for root using “crontab -l”)

thanks for advices

I added a services to start and keep running the fulltextsearch:live
I works but I cannot see the result
adding a text into a file is not giving any new search results, even a long time after

any way to debug this index live to understand why it is not updated ?
I do not see the logs concerning new/updated indexes into /var/log/elasticsearch

In fact the only way to get update for new files or modified file I found is :

1/ sudo nextcloud.occ fulltextsearch:reset
2/ date;sudo nextcloud.occ fulltextsearch:index --no-readline;date

this seems crazy as it takes several hours
I can only imagine a cron every week

no so many comments in Netxcloud community ?
nobody is using elastic search ?

Thanks

I have a the same problem. I’m running nextcloud as a snap service as you do. Your comments are helpful alas I didn’t find a way to improve upon your approach. I just wanted to thank for you content and say: You are not the only with that kind of problem.
Additionally I have problems with the ealsticsearch-plugin ingest attachment version getting out of sync. With sudo systemctl status elasticsearch in a failed state, and a error message of the kind Plugin [ingest-attachment] was built for Elasticsearch version 7.17.20 but version 7.17.21 is running. Which requires me to run:

sudo /usr/share/elasticsearch/bin/elasticsearch-plugin remove ingest-attachment
sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment
sudo systemctl restart elasticsearch

Maybe someone else finds this information useful.