Package com.atlassian.jira.search.index
Interface IndexAccessor
- All Known Subinterfaces:
WritableIndexAccessor
- All Known Implementing Classes:
LuceneIndexAccessor,OpenSearchIndexAccessor,ReadYourWritesIndexAccessor
@PublicApi
public interface IndexAccessor
Provides access to an index along with some index operations
- Since:
- 10.4
-
Method Summary
Modifier and TypeMethodDescriptionReturns current schema of the index.Returns current searcher of the index.voidrecreate()Deletes and recreates an empty indexvoidrefresh()Calling this method forces the data mutated so far to become available for search thus by passing the default visibility mode.voidupdateSchema(UnaryOperator<IndexSchema> schemaProvider) Updates the index.
-
Method Details
-
getSchema
IndexSchema getSchema()Returns current schema of the index.- Returns:
- schema of the index.
-
getSearcher
IndexSearcher getSearcher()Returns current searcher of the index.- Returns:
- searcher of the index.
-
refresh
Calling this method forces the data mutated so far to become available for search thus by passing the default visibility mode.- Throws:
IndexOperationException- if the operation failed
-
recreate
Deletes and recreates an empty index- Throws:
IndexOperationException- if the operation failed
-
updateSchema
Updates the index.- Parameters:
schemaProvider- a function that takes the current schema and returns the new schema- Throws:
IndexOperationException- if the operation failed
-