Update_by_query 404 Not Found

I use updateByQuery in kibana plugin, but get 404 not found Error, my code as below:

    index: 'logstash-0',
    conflicts: 'proceed',
    body: {
       query: {...},
       doc: {extension: 'png'}
.then(resp => {

Take a look at the Elasticsearch-js documentation on Update By Query: https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-updatebyquery

It tells you that what you can enter for the body parameter can be found in the Elasticsearch documentation for Update By Query: https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-update-by-query.html

It doesn't look like your doc field is valid, according to the Elasticsearch documentation.

I would first try querying directly to ES, make sure it works, and then try to port the body of the query into JS code from there.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.