How To Solve Issues Related to Log – Unable to execute the initial scan request of delete by query

Improve Your Elasticsearch Configuration

No Installation Required
No Security Risk
3 Free Minute Process !

No Installation

Updated: Feb-20

In-Page Navigation (click to jump) :

Opster Offer’s World-Class Elasticsearch Expertise In One Powerful Product
Try Our Free Elasticsearch Check-Up   Fix Painful Mistakes !

Troubleshooting background

To troubleshoot Elasticsearch log “Unable to execute the initial scan request of delete by query” it’s important to understand common problems related to Elasticsearch concepts: delete, delete-by-query, deletebyquery, plugins, request. See detailed explanations below complete with common problems, examples and useful tips.

DELETE Elasticsearch API

What is it

DELETE  is an Elasticsearch API which removes a document from a specific index. This API requires an index name and _id document to delete the document. 

Delete a document

DELETE /my_index/_doc/1
  • A delete request throws 404 error code if the document does not already exist in the index.
  • If you want to delete a set of documents that  matches a query, you need to use delete by query API.

To help troubleshoot related issues we have gathered selected Q&A from the community and issues from Github , please review the following for further information :

1 SearchPhaseExecutionException[Failed to execute phase [query], all shards failed] 50.33 K 13

2Github Issue Number 7052  

Log Context

Log ”unable to execute the initial scan request of delete by query” classname is
We have extracted the following from Elasticsearch source code to get an in-depth context :

                     public void onFailure(Throwable e) {
            } catch (Throwable t) {
                logger.error("unable to execute the initial scan request of delete by query"; t);

        void executeScroll(final String scrollId) {

About Opster

Opster identifies and predicts root causes of Elasticsearch problems, provides recommendations and can automatically perform various actions to prevent issues, optimize performance and save resources.

Learn more: Glossary | Blog| Troubleshooting guides | Error Repository

Need help with any Elasticsearch issue ? Contact Opster