Class OpenSearchIndexWriter
- java.lang.Object
-
- com.atlassian.confluence.plugins.opensearch.OpenSearchIndexWriter
-
- All Implemented Interfaces:
SearchIndexWriter
- Direct Known Subclasses:
OpenSearchBulkIndexWriter
public class OpenSearchIndexWriter extends Object implements SearchIndexWriter
SearchIndexWriter for adding and deleting documents on OpenSearch- Since:
- 8.6
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
OpenSearchIndexWriter.IndexSetting
-
Field Summary
Fields Modifier and Type Field Description protected org.opensearch.client.opensearch.OpenSearchClient
client
protected static String
INDEX_NUMBER_OF_REPLICAS
protected static String
INDEX_REFRESH_INTERVAL
protected OpenSearchIndexManager
indexManager
protected String
indexName
protected Map<String,OpenSearchIndexWriter.IndexSetting>
indexSettings
protected DelegatingQueryMapper
queryMapperRegistry
-
Constructor Summary
Constructors Constructor Description OpenSearchIndexWriter(org.opensearch.client.opensearch.OpenSearchClient client, OpenSearchIndexManager indexManager, DelegatingQueryMapper queryMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(AtlassianDocument document)
protected Map<String,Collection<Object>>
convert(AtlassianDocument document)
void
delete(SearchQuery searchQuery)
void
deleteAll()
void
postOptimize()
void
preOptimize()
-
-
-
Field Detail
-
INDEX_REFRESH_INTERVAL
protected static final String INDEX_REFRESH_INTERVAL
- See Also:
- Constant Field Values
-
INDEX_NUMBER_OF_REPLICAS
protected static final String INDEX_NUMBER_OF_REPLICAS
- See Also:
- Constant Field Values
-
client
protected final org.opensearch.client.opensearch.OpenSearchClient client
-
indexName
protected final String indexName
-
indexManager
protected final OpenSearchIndexManager indexManager
-
queryMapperRegistry
protected final DelegatingQueryMapper queryMapperRegistry
-
indexSettings
protected final Map<String,OpenSearchIndexWriter.IndexSetting> indexSettings
-
-
Constructor Detail
-
OpenSearchIndexWriter
public OpenSearchIndexWriter(org.opensearch.client.opensearch.OpenSearchClient client, OpenSearchIndexManager indexManager, DelegatingQueryMapper queryMapper)
-
-
Method Detail
-
add
public void add(AtlassianDocument document) throws IOException
- Specified by:
add
in interfaceSearchIndexWriter
- Throws:
IOException
-
convert
protected Map<String,Collection<Object>> convert(AtlassianDocument document)
-
delete
public void delete(SearchQuery searchQuery) throws IOException
- Specified by:
delete
in interfaceSearchIndexWriter
- Throws:
IOException
-
deleteAll
public void deleteAll() throws IOException
- Specified by:
deleteAll
in interfaceSearchIndexWriter
- Throws:
IOException
-
preOptimize
public void preOptimize() throws IOException
- Specified by:
preOptimize
in interfaceSearchIndexWriter
- Throws:
IOException
-
postOptimize
public void postOptimize() throws IOException
- Specified by:
postOptimize
in interfaceSearchIndexWriter
- Throws:
IOException
-
-