The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Using script runner, I want to use the java API to check if jira is currently being indexed and if so, i want to pause it temporarily. I know how to use the indexmanager class to start a new reindex process but I want to check if an index has begun outside of a given script.
Specifically, i have a scripted field that makes a jql search. The search throws an error during indexing. So i want to check if jira is being reindexed and pause it before the search.
That was my first thought but that only allows me to create a new indexer and start indexing. I dont see how to grab the current indexing process.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There must be JAVA API for this, just need to keep searching until you find it.
or, you can try to use this REST API:
https://docs.atlassian.com/software/jira/docs/api/REST/8.14.1/#api/2/reindex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The rest api allows me to query the currently running index but still no way to stop or pause
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is required a lot of digging and tests.
But basically, Reindex is a task, so you can use this JAVA API:
https://docs.atlassian.com/software/jira/docs/api/7.2.2/com/atlassian/jira/task/TaskManager.html
to search over all tasks and if there is a "reindex" running, and if yes then cancel it.
However, I think it's not a best practive to stop reindex process, specially not on regular basis, but it's your call.
I would wait for the reindex to stop and than continue what ever you want to do.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.