Class OpenSearchIndexAccessor
java.lang.Object
com.atlassian.jira.search.opensearch.OpenSearchIndexAccessor
- All Implemented Interfaces:
IndexAccessor,WritableIndexAccessor
-
Constructor Summary
ConstructorsConstructorDescriptionOpenSearchIndexAccessor(org.opensearch.client.opensearch.OpenSearchClient openSearchClient, String indexName, OpenSearchIndexMappingsService openSearchIndexMappingsService, JiraProperties jiraProperties, AnalysisSettingProvider analysisSettingsSupplier, AggregationsRequestMapper aggregationsRequestMapper, AggregationsResponseMapper aggregationsResponseMapper, OpenSearchQuerySortService openSearchQuerySortService, OpenSearchQueryMapperRegistry queryMapperRegistry, IndexWriter indexWriter) -
Method Summary
Modifier and TypeMethodDescriptionorg.opensearch.client.opensearch.OpenSearchClientReturns current schema of the index.Returns current searcher of the index.Get the writer of the index.voidvoidrecreate()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.
-
Constructor Details
-
OpenSearchIndexAccessor
public OpenSearchIndexAccessor(org.opensearch.client.opensearch.OpenSearchClient openSearchClient, String indexName, OpenSearchIndexMappingsService openSearchIndexMappingsService, JiraProperties jiraProperties, AnalysisSettingProvider analysisSettingsSupplier, AggregationsRequestMapper aggregationsRequestMapper, AggregationsResponseMapper aggregationsResponseMapper, OpenSearchQuerySortService openSearchQuerySortService, OpenSearchQueryMapperRegistry queryMapperRegistry, IndexWriter indexWriter)
-
-
Method Details
-
getSchema
Description copied from interface:IndexAccessorReturns current schema of the index.- Specified by:
getSchemain interfaceIndexAccessor- Returns:
- schema of the index.
-
getSearcher
Description copied from interface:IndexAccessorReturns current searcher of the index.- Specified by:
getSearcherin interfaceIndexAccessor- Returns:
- searcher of the index.
-
refresh
Description copied from interface:IndexAccessorCalling this method forces the data mutated so far to become available for search thus by passing the default visibility mode.- Specified by:
refreshin interfaceIndexAccessor- Throws:
IndexOperationException- if the operation failed
-
recreate
Description copied from interface:IndexAccessorDeletes and recreates an empty index- Specified by:
recreatein interfaceIndexAccessor- Throws:
IndexOperationException- if the operation failed
-
updateSchema
Description copied from interface:IndexAccessorUpdates the index.- Specified by:
updateSchemain interfaceIndexAccessor- Parameters:
schemaProvider- a function that takes the current schema and returns the new schema- Throws:
IndexOperationException- if the operation failed
-
initialize
- Throws:
IndexOperationException
-
getWriter
Description copied from interface:WritableIndexAccessorGet the writer of the index.- Specified by:
getWriterin interfaceWritableIndexAccessor- Returns:
- writer of the index.
-
getOpenSearchClient
public org.opensearch.client.opensearch.OpenSearchClient getOpenSearchClient()
-