We have an elasticsearch index created in 6.8.23 version, and we used to use script based updates for the documents, which used to be working fine as expected. After upgrading the Elasticsearch version to 7.17, the script based bulk update has stopped working.
Upon further analyzing the data, what we could see is, our 6.8.23 indices have created with custom type mapping, where as in 7.17 as type is deprecated we are not specifying any type while invoking the Bulk API. While executing the script, the _source field is not having the entire document that we are sending.
My question here is, is this a supported scenario? Do we support script based updates for the 6.8.23 indices from 7.17 ES? If yes, could you please help in figuring out the steps that I'm missing here.
We have something like,
BulkDescriptor bulkDescriptor = new BulkDescriptor(); bulkDescriptor.Update<T>(new BulkUpdateDescriptor<T,T>() .Script(x=>x.Source("scriptName").Params(....)) .Id(...) .Upsert(doc); client.Bulk(bulkDescriptor).Index("indexName");
I've tried by passing the .doc parameter to the descriptor, but that is not hitting the script. And I also have tried by providing typeasquery parameter, which is neither working to retrieve the _source completely.