whoami
(whoami)
June 21, 2017, 2:57am
1
I use updateByQuery in kibana plugin, but get 404 not found Error, my code as below:
esAdmin.updateByQuery({
index: 'logstash-0',
conflicts: 'proceed',
body: {
query: {...},
doc: {extension: 'png'}
}
})
.then(resp => {
console.log(resp);
})
tsullivan
(Tim Sullivan)
June 21, 2017, 5:54pm
2
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.
system
(system)
Closed
July 19, 2017, 5:54pm
3
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.