Package com.atlassian.jira.dev.backdoor
Class IndexingBackdoor
java.lang.Object
com.atlassian.jira.dev.backdoor.IndexingBackdoor
@Consumes("application/json")
@Produces("application/json")
@Path("/indexing")
public class IndexingBackdoor
extends Object
Backdoor for starting/stopping/querying indexing.
- Since:
- v5.2
-
Constructor Summary
ConstructorsConstructorDescriptionIndexingBackdoor(IssueIndexer issueIndexer, TaskManager taskManager, I18nHelper.BeanFactory i18nFactory, JiraAuthenticationContext jiraAuthenticationContext, IssueIndexManager issueIndexManager, ProjectManager projectManager, SearchService searchService, IssueManager issueManager, IndexPathManager indexPathManager, UserManager userManager, ReindexRequestManager reindexRequestManager, ClusterManager clusterManager, ProjectReindexService projectReindexService, EntityFieldValuesFactory entityFieldValuesFactory, SearchTemporaryIndexSearcher searchTemporaryIndexSearcher, IndexAccessorRegistry indexAccessorRegistry) -
Method Summary
Modifier and TypeMethodDescriptionlongbooleanvoidvoiddeleteIndexDirectory(boolean issues, boolean comments, boolean worklogs, boolean history) longgetIndexingProgress(Long projectId) booleanindexDummyIssue(String id, String issueType, String projectId, String key, String summary, String description) booleanbooleanisIndexingProject(Long projectId) booleanisIndexingProjectStarted(Long projectId) booleanbooleanbooleanjakarta.ws.rs.core.ResponsemakeReindexRequest(ReindexRequestType type, List<String> sharedEntityTypes) jakarta.ws.rs.core.ResponsePause the index repair service running in background - Lucene specificjakarta.ws.rs.core.ResponsePause the index replay service running in background - OpenSearch specificjakarta.ws.rs.core.ResponsePause the scheduled reindex servicevoidjakarta.ws.rs.core.Responserefresh()jakarta.ws.rs.core.Responsejakarta.ws.rs.core.ResponsereindexProject(String projectId) jakarta.ws.rs.core.Responsejakarta.ws.rs.core.ResponseStart the index repair service running in background - Lucene specificjakarta.ws.rs.core.ResponseStart the index replay service running in background - OpenSearch specificjakarta.ws.rs.core.ResponseStart the scheduled reindex servicejakarta.ws.rs.core.ResponsetemporaryIndex(String issueKey) Tests that we can create a temporary index, index an issue, and search for it.triggerBackgroundIndexing(boolean reindexComments, boolean reindexChangeHistory, boolean reindexWorklog, boolean reindexIssues) void
-
Constructor Details
-
IndexingBackdoor
@Inject public IndexingBackdoor(IssueIndexer issueIndexer, TaskManager taskManager, I18nHelper.BeanFactory i18nFactory, JiraAuthenticationContext jiraAuthenticationContext, IssueIndexManager issueIndexManager, ProjectManager projectManager, SearchService searchService, IssueManager issueManager, IndexPathManager indexPathManager, UserManager userManager, ReindexRequestManager reindexRequestManager, ClusterManager clusterManager, ProjectReindexService projectReindexService, EntityFieldValuesFactory entityFieldValuesFactory, SearchTemporaryIndexSearcher searchTemporaryIndexSearcher, IndexAccessorRegistry indexAccessorRegistry)
-
-
Method Details
-
triggerBackgroundIndexing
@POST @Path("background") public Long triggerBackgroundIndexing(@QueryParam("comments") boolean reindexComments, @QueryParam("changeHistory") boolean reindexChangeHistory, @QueryParam("worklogs") boolean reindexWorklog, @QueryParam("issues") @DefaultValue("true") boolean reindexIssues) -
triggerStopTheWorldIndexing
@POST @Path("stoptheworld") public void triggerStopTheWorldIndexing() -
deleteIndex
@POST @Path("deleteIndex") public void deleteIndex() -
deleteIndexDirectory
@POST @Path("deleteIndexDirectory") public void deleteIndexDirectory(@QueryParam("issues") boolean issues, @QueryParam("comments") boolean comments, @QueryParam("worklogs") boolean worklogs, @QueryParam("history") boolean history) -
deindex
-
indexDummyIssue
-
temporaryIndex
@POST @Path("temporaryIndex") public jakarta.ws.rs.core.Response temporaryIndex(@QueryParam("issueKey") String issueKey) throws SearchException Tests that we can create a temporary index, index an issue, and search for it.Temporary indexes are Lucene indexes even when the search platform is OpenSearch. Even when the search platform is OpenSearch, we should still be able to use temporary indexes.
You need at least one issue in your Jira instance in order to be able to use this endpoint as we need to index an issue in the temporary index.
- Returns:
- OK if we were able to index and search for the issue, server error otherwise.
- Throws:
SearchException- when there are no issues in the search index, or we weren't able to find the issue in the temporary index.
-
reindexAll
@POST @Path("reindexAll") public jakarta.ws.rs.core.Response reindexAll() -
reindexProject
@POST @Path("reindexProject/{projectId}") public jakarta.ws.rs.core.Response reindexProject(@PathParam("projectId") String projectId) -
pauseScheduledReindex
@POST @Path("scheduledReindex/pause") public jakarta.ws.rs.core.Response pauseScheduledReindex()Pause the scheduled reindex service -
startScheduledReindex
@POST @Path("scheduledReindex/start") public jakarta.ws.rs.core.Response startScheduledReindex()Start the scheduled reindex service -
pauseIndexRepairService
@POST @Path("repairService/pause") public jakarta.ws.rs.core.Response pauseIndexRepairService()Pause the index repair service running in background - Lucene specific -
startIndexRepairService
@POST @Path("repairService/start") public jakarta.ws.rs.core.Response startIndexRepairService()Start the index repair service running in background - Lucene specific -
pauseOpenSearchReplayService
@POST @Path("replayService/pause") public jakarta.ws.rs.core.Response pauseOpenSearchReplayService()Pause the index replay service running in background - OpenSearch specific -
startOpenSearchReplayService
@POST @Path("replayService/start") public jakarta.ws.rs.core.Response startOpenSearchReplayService()Start the index replay service running in background - OpenSearch specific -
replayIndex
@POST @Path("replayService/replay") public jakarta.ws.rs.core.Response replayIndex() throws IndexOperationException, SearchException -
makeReindexRequest
@GET @Path("makeReindexRequest") public jakarta.ws.rs.core.Response makeReindexRequest(@QueryParam("type") ReindexRequestType type, @QueryParam("sharedEntityType") List<String> sharedEntityTypes) -
isIndexingRunning
@GET public boolean isIndexingRunning() -
isIndexingStarted
@GET @Path("started") public boolean isIndexingStarted() -
isIndexingProject
-
getIndexingProgress
@GET @Path("project/progress") public long getIndexingProgress(@QueryParam("projectId") Long projectId) -
isIndexingProjectStarted
@GET @Path("project/started") public boolean isIndexingProjectStarted(@QueryParam("projectId") Long projectId) -
isIndexConsistent
@GET @Path("consistent") public boolean isIndexConsistent() -
isIndexUpdatedFieldConsistent
@GET @Path("consistent/updated") public boolean isIndexUpdatedFieldConsistent() throws SearchException- Throws:
SearchException
-
clearPendingReindexRequests
@GET @Path("clearPendingReindexRequests") public long clearPendingReindexRequests() -
periodicStats
@POST @Path("periodicStats") public void periodicStats() -
refresh
@POST @Path("refresh") public jakarta.ws.rs.core.Response refresh()
-