We have a custom field that checks to see if a user has logged work on any issues in the last N days. The field uses the worklogged issue function and returns the number of issues that have work logged on them. We then run a query to find all users whose value for this field is 0. When work logs are recorded, the custom field returns the correct updated value, but the search index is not updated, so the query returns the old value.
Running full re-index manually fixes the issues, but we will need an automated solution.
What would be the best way to trigger a re-index of the custom field's value so search results work correctly?
Using JIRA 6.3.5 and ScriptRunner 3.0.5