How I can update SHA1 for a lot of millions records in index?
like...
{
"query": ...
"script": "ctx._source.sha1 = sha1(ctx._source.field)"
}
Painless has not built-in SHA1 function as is as groovy.
Do exist a way without using client-side?
If I can't do this, how I can use python for this?
The
Groovy
,JavaScript
, andPython
scripting languages were deprecated inelasticsearch
5.0 and have been removed from 6.0 (see here). You must usepainless
.Here you can find my sha1 and sha256 painless implementations.