Class OpenSearchBulkIndexWriter
java.lang.Object
com.atlassian.confluence.plugins.opensearch.bulk.OpenSearchBulkIndexWriter
- All Implemented Interfaces:
SearchIndexWriter
An index writer that uses OpenSearch bulk API.
- Since:
- 8.7
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOpenSearchBulkIndexWriter
(org.opensearch.client.opensearch.OpenSearchClient client, OpenSearchIndexManager indexManager, String indexName, DelegatingQueryMapper queryMapper, io.github.resilience4j.retry.RetryRegistry retryRegistry) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(AtlassianDocument document) protected Map<String,
Collection<Object>> convert
(AtlassianDocument document) void
delete
(SearchQuery searchQuery) void
void
flush()
void
void
void
update
(String documentId, AtlassianDocument document) Applies partial updates to the document with the given id.
-
Field Details
-
MAX_DOCS
public static final int MAX_DOCS- See Also:
-
OPTIMIZE_RAM_PROPERTY
- See Also:
-
OPTIMIZE_RAM_DEFAULT
public static final int OPTIMIZE_RAM_DEFAULT- See Also:
-
-
Constructor Details
-
OpenSearchBulkIndexWriter
public OpenSearchBulkIndexWriter(org.opensearch.client.opensearch.OpenSearchClient client, OpenSearchIndexManager indexManager, String indexName, DelegatingQueryMapper queryMapper, io.github.resilience4j.retry.RetryRegistry retryRegistry)
-
-
Method Details
-
getBuffer
-
add
- Specified by:
add
in interfaceSearchIndexWriter
- Throws:
IOException
-
delete
- Specified by:
delete
in interfaceSearchIndexWriter
- Throws:
IOException
-
deleteAll
- Specified by:
deleteAll
in interfaceSearchIndexWriter
- Throws:
IOException
-
flush
- Throws:
IOException
-
preOptimize
public void preOptimize()- Specified by:
preOptimize
in interfaceSearchIndexWriter
-
postOptimize
public void postOptimize()- Specified by:
postOptimize
in interfaceSearchIndexWriter
-
convert
-
update
Description copied from interface:SearchIndexWriter
Applies partial updates to the document with the given id. The updates applied are the fields specified in the document passed as an argument. OpenSearch Only. DO NOT USE for Lucene.- Specified by:
update
in interfaceSearchIndexWriter
- Parameters:
documentId
- ID of the existing document to be updateddocument
- The partial update to be applied to the existing document- Throws:
IOException
-