Hi
Questions regarding the Re-index Issues function in scriptrunner.
Can any of you explain to me exactly what a reindexing does and whether there are any risks associated with running it?
And how is it different from the function in JIRA:
I have found the following explanation so far:
"A Jira index is a pile of local files Jira generates from the database. They help it do most of its day-to-day work a lot faster than if it had to read the database for everything.
The reindex function rebuilds a clean index from the database.
So, there's no point backing up before reindexing. If your reindex goes wrong, the absolute worst case is searches don't work, and the fix is to do a full reindex!"
I think that looks like one of my old answers.
Scriptrunner does not actually do the re-indexing itself, it calls the re-index function in Jira for the list of issues you give it. So it has the same risks as using the Jira re-index function.
A re-index is exactly what it says it is - it removes the old index data and creates a new set read from the issue data. In a well-maintained Jira, you don't need to do it, because issues are re-indexed fully on every change, but things can go wrong that mean the index records go out of line with the database, and that's when you'll need to do it.
Thank you very much. What is the best way for me to check that it is time for a re-index? Are there any native functions in JIRA i can use?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Depends on the type of indexing, but generally, it's simple -
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use Script Runner to run the re-indexing service of Jira. It uses the same service by code in order to reindex issues. There is no need to back up Jira if you want to reindex a few issues (which is background indexing).
On the other hand, if you have a large instance and want to start a full reindex, then it blocks the usage of Jira until it finishes. It is recommended to back up Jira before full reindex, because starting full reindex immediately deletes the existing index files and if unexpected problems occur, corrupted index files may impact the daily usage of Jira including searches (in particular).
I hope it makes sense!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.