Hi,
I'm not even sure whether it's possible or not. The problem is I didn't define the datetime format from the beginning and elasticsearch assumes it was in UTC and added 8 hours on every document. So I did following:
POST _reindex
{
"source": {
"index": "previous-index"
},
"dest": {
"index": "new-index"
},
"script": {
"lang": "expression",
"inline": "ctx._source['datetime'] - multiplier",
"params": {
"multiplier": "8h"
}
}
}
Which gives me an following:
{
"error": {
"root_cause": [
{
"type": "unsupported_operation_exception",
"reason": "scripts of type [inline], operation [update] and lang [expression] are not supported"
}
],
"type": "unsupported_operation_exception",
"reason": "scripts of type [inline], operation [update] and lang [expression] are not supported"
},
"status": 500
}
Added following entry to elasticsearch.yml but no luck.
script.engine.groovy.inline.update: on
Any way to solve this issue? Thanks!