Elasticsearch - Index Management
You want to reindex data from products_old to products_new and rename the field price to cost during reindexing. Which script correctly performs this transformation?
You want to reindex data from products_old to products_new and rename the field price to cost during reindexing. Which script correctly performs this transformation?
cost from price and removes price, correctly renaming it.cost from price incorrectly. { "source": { "index": "products_old" }, "dest": { "index": "products_new" }, "script": { "source": "ctx._source.cost = ctx._source.price" } } copies price to cost but does not remove price. { "source": { "index": "products_old" }, "dest": { "index": "products_new" }, "script": { "source": "ctx._source.price = ctx._source.remove('cost')" } } incorrectly removes cost.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions