Can I get some suggestions around updating a single field across multiple documents in the elasticsearch? Thing here is need to get a value of that field (existing) compare it will an external value and do some calculations and replace it in place update. Was thinking to use updatebyquery because of scroll performance but need help in how best we can pass through the external data value.. or is there a way to call an external API from update by query by iterating through each document as the calculated values might be based on each doc other field values using script??
Thanks a lot for your reply @Christian_Dahlqvist . But need help in how can I call an external function or api from within the script ? Any examples please on calling a plugin function or may be an external api by passing the current document other field values and getting a calculated value (calculation will be done externally by taking the doc values of the current document)
Thank you @Christian_Dahlqvist , I am trying to use RestClient from JAVA so that get the matching documents and then update the field by externally calculating the necessaries. But now my question is can we use scroll with SearchResponse ? as I need to paginate a lots of documents?
I am reading scroll is kind of deprecated in the recent elasticsearch client 8.4. If yes what are the alternatives for better performances? as I said need to iterate through lot of documents and update each one.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.