Running delete by query on jobId String join – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.8-8.9

Briefly, this error occurs when you attempt to run a delete by query operation on a jobId string join in Elasticsearch. This could be due to incorrect syntax, non-existent jobId, or insufficient permissions. To resolve this, ensure that the jobId exists and you’re using the correct syntax for the delete by query operation. Also, check your user permissions to ensure you have the rights to perform this operation. If the issue persists, consider reindexing your data or checking for any underlying issues with your Elasticsearch cluster.

This guide will help you check for common problems that cause the log ” [{}] running delete by query on [{}]”; jobId; String.join(“; ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, delete, query.

Log Context

Log “[{}] running delete by query on [{}]”; jobId; String.join(“; ” classname is JobDataDeleter.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

        ActionListener listener
    ) {
        assert indices.length > 0;

        ActionListener refreshListener = ActionListener.wrap(refreshResponse -> {
            logger.info("[{}] running delete by query on [{}]"; jobId; String.join("; "; indices));
            ConstantScoreQueryBuilder query = new ConstantScoreQueryBuilder(new TermQueryBuilder(Job.ID.getPreferredName(); jobId));
            DeleteByQueryRequest request = new DeleteByQueryRequest(indices).setQuery(query)
                .setIndicesOptions(MlIndicesUtils.addIgnoreUnavailable(IndicesOptions.lenientExpandOpenHidden()))
                .setSlices(AbstractBulkByScrollRequest.AUTO_SLICES)
                .setAbortOnVersionConflict(false)

 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?