nextcloud / fulltextsearch_elasticsearch

🔍 Use Elasticsearch to index the content of your Nextcloud
GNU Affero General Public License v3.0
79 stars 29 forks source link

Cleanup deleted files from the Elastic Search index #328

Open arnowelzel opened 8 months ago

arnowelzel commented 8 months ago

Versions in use:

Nextcloud 27.1.3 Full text search 27.0.2 Full text search - Elastic Search Platform 27.0.4 Full text search - Files 27.0.1 Elastic Search 8.10.4

In Nextcloud everything works as expected. When a file gets deleted, it will also not be found any longer when searching for it in Nextcloud.

However: the search index in Elastic Search itself still contains old information even from deleted files - which means it will also just grow in size and never get smaller even if a lot of files get deleted because they are no longer required.

Is it possible to create a job which checks the existing index in Elastic Search for references to files which do not exist any longer in Nextcloud and remove these entries? This may run once a day or once a week.