Package com.atlassian.jira.search
Interface IndexConsistencyChecker
- All Known Implementing Classes:
LuceneConsistencyChecker,OpenSearchConsistencyChecker
public interface IndexConsistencyChecker
Extracted from
IndexLifecycleManager to allow disabling index consistency
checks for OpenSearch.-
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether this index is available.boolean
-
Method Details
-
isIndexAvailable
@Internal boolean isIndexAvailable()Whether this index is available.The index is not available if the index is being rebuilt or recovered. In a clustered environment this reflects only the state on the local node.
Jira Search exposes a common API backed by multiple search engines. This method bypasses that abstraction and couples callers to Lucene internals.
Using this method in platform-agnostic code, or when the runtime search platform is not Lucene (e.g. OpenSearch), may produce incorrect results or failures.
Internal use only.
- Returns:
- Whether this index is available.
-
isIndexConsistent
boolean isIndexConsistent()- Returns:
- the result of a simple consistency check that compares the index state to the current number of issues. A
background re-index should not be attempted when this returns
false. Note that for Lucene,falseis also returned if the index is not available .
-