Update by query
Update by Query API is used to update all documents that match a particular query. Depending on the number of documents in the index, this can be a very resource-demanding operation and can slow the existing search or index operations. We will discuss the different ways to control the number of requests per second and how to parallel this operation.
For example, for the products we indexed using the bulk API in the previous section, we want to add a new price_with_tax field, which contains the price plus tax. We will use update by query and scripting for the calculation. Assuming 10% is the tax, we will use the unit price to determine the price with tax. We will be use the default scripting language Painless for this operation. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access