Store last read date in index metadata
@fabrizzio-dotCMS is already working on this.
Since Sep 11, 2026.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Problem
Indexes - especially site search indexes - are not strongly consistent with any data in dotCMS db - meaning we have no record of which indexes are actually being used. Some have aliases but not all. This presents a problem when trying to clean up older site search indexes - we run the risk of deleting an index that is actually being used for search results. We need a way to keep track of which indexes have been recently used and which indexes are just sitting there taking up space.
The idea is that when an index is read from in dotCMS, we add it a Set<String> of the index names that is stored in java memory. Every night, we have a job that reads that set, clears it and then updates the touched index metadata with the last_read_date (YY-MM-DD).
Once an index is no longer in use, that date will not be updated and naturally age out and we can write a quick cronjob that prunes unread indexes that are greater than X days.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.