So, total = multiplier * subtotal. Multiplier is determined by User on my application. When multiplier is changed to another value, I have to update multiplier and total in all documents. I'm pondering how to achieve this with the best performance. I came up with strategies below:
Update_By_Query
I don't have any idea how to update nested object fields using update_by_query. Is it also possible to update those fields in native script plugin (Java)? (in my real case I'm using native script)
Batch GET and Bulk UPDATE
The last strategy that I'm thinking of. In my code, get all documents, looping each document to update the multiplier and total and send them back to elasticsearch. I'm worry about the performance especially when there are 100,000 documents.
Is there any other recommended strategy? What do you suggest?
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.