Will a correct and working configuration of ElasticSearch fulltext search autmatically update the index as files are added? Or is there something we have to cron?
sudo -u apache php /var/www/html/nextcloud/occ fulltextsearch:index
worked correctly in creating an index of all the files that are currently in the instance, but what about newly added files?
After the files were indexed for the first time, you don’t need a cron job for updating the index as this is done in the context of NC’s cron job. Means that you have to wait for the next cron job is scheduled before you can find new/changed documents with the full text search.
If in doubt, you can try it by adding a new document and wait for the cron jonb to run. After that, you should be able to find the newly added document in the full test search.
On NC 14 there will be a “live” feature and I assume that this will trigger an update as soon as new/changed files were detected.
@DecaTec thank you for the explanation. I will have a look at NC 14’s behaviour. Something worth asking for any other newcomers here, one should probably run the initial index manually, before adding the nextcloud cronjob if your instance is very big. That way you will not spawn multiple indexing processes? Or is this illogical of me to wonder about?
Well, usually one of the first things to do on a new NC instance is configuring the cron job for every 15 minutes. In most cases, the full text search will be installed afterwards.
From my own experience: Cron runs every 15 min and the initial indexing took over an hour on my instance.
As long as there are no errors shown while first indexing, everything should be fine.
Thank you so much. We have 10+ million files in production. I think our index will take a wee bit longer. But this is good info for any newcomers. Thanks again @DecaTec
More than 10m files?! That’s pretty much. I just took another look at my NC: ~1h indexing for ~1500 files (mostly on external storage).
I would be interested to know how long initial indexing takes on your instance.
hmmm …
my NC14 with ElasticSearch fulltext is working correct !
But new Documents (pdf, txt …) is always after 7 Days in the index, by added Documents 1-7 Days, i have in Fulltextsearch no results in the “new” documents.
hi, does it trigger also the external stores and how often?
and if 10 users have the same external datastore configured global, does it index the files ten times?
Worth noting… Indexing doesn’t seem to occur inside the Docker NC image via the cron.php. I currently have a containerized deployment of NextCloud 17 and I have to either run fulltextsearch:live as a service on the host OS or run a cron job alongside the standard cron.php that runs fulltextsearch:index or live.
Possibly something wrong with the the NC docker image, not sure. I have had to edit the cron.php to not log out this error:
[fulltextsearch] Warning: Exception while live index: OCA\FullTextSearch\Exceptions\RunnerAlreadyUpException - Index is already running
Looks like the live service and cron.php don’t play nice together.
What was your result? How long did it take?
I’m currently indexing about 400000 files in groupfolders for 80 users and it’s been running for 2 days
Don’t know when search will start? Will it work and will it index everything? I’m still not looking for anything