Adding an integer value with the existing _id while doing reindex

HI,

I would like to reindex with following scenario:
/source/type/1 to /destination/type/ ((1<<56) + _id). So if the _id in source index is _id=10 then at destination index same document should be at 72057594037927940 (calculated by 1<<56 = 72057594037927936 + ( source index _id)) . I tried with
"script": {
"source": "ctx._id = 'append' + ctx._id" } (where append is 1<<56 ) but it is concatenating the "72057594037927936" and "10" and creating the document at destination index at id 7205759403792793610. Please help me

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