Package com.atlassian.jira.search.index
Interface IndexWriter
- All Known Implementing Classes:
OpenSearchIndexWriter
@Internal
public interface IndexWriter
Implementations provide access to the search index to create, update and delete documents.
It's only supported for OpenSearch.
- Since:
- 10.4
-
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(DeleteRequest deleteRequest) Deletes a document based on the providedDeleteRequest.voiddeleteBulk(Set<DeleteRequest> deleteRequests) Delete a bulk of documents based on the provided Set ofDeleteRequestobjects.voiddeleteByQuery(DeleteByQueryRequest deleteByQueryRequest) Delete documents satisfying the givenDeleteByQueryRequestfilter.voidput(IndexRequest indexRequest) Creates or updates a document for the provided identifier and fields in theIndexRequestDocument.voidupdateBulk(UpdateBulkRequest request) Update a bulk of documents based on theUpdateBulkRequest.
-
Method Details
-
delete
Deletes a document based on the providedDeleteRequest.- Parameters:
deleteRequest- the delete request- Throws:
IndexOperationException- if the operation has failed
-
deleteBulk
Delete a bulk of documents based on the provided Set ofDeleteRequestobjects.- Parameters:
deleteRequests- the delete requests- Throws:
BulkIndexOperationsException- if one or more requested operations have failed
-
deleteByQuery
Delete documents satisfying the givenDeleteByQueryRequestfilter.- Parameters:
deleteByQueryRequest- the delete by query request- Throws:
IndexOperationException- if the operation has failed
-
put
Creates or updates a document for the provided identifier and fields in theIndexRequestDocument. If a document with the same ID exists then it performs an update, otherwise it will create a new document.- Parameters:
indexRequest- the index request- Throws:
IndexOperationException- if the operation has failed
-
updateBulk
Update a bulk of documents based on theUpdateBulkRequest.- Parameters:
request- contains documents to be updated- Throws:
BulkIndexOperationsException- if one or more requested operations have failed
-